From c259961ce2ea5c81d061b50252d0df414a6610da Mon Sep 17 00:00:00 2001 From: Chad Woolley Date: Sun, 24 Jul 2022 21:21:21 -0700 Subject: [PATCH] Create Dockerfile.gitlab-vscode-nodeless --- .gitlab/ci/custom.images.yml | 3 +++ Dockerfile.gitlab-vscode-nodeless | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Dockerfile.gitlab-vscode-nodeless diff --git a/.gitlab/ci/custom.images.yml b/.gitlab/ci/custom.images.yml index a65447e..725ef15 100644 --- a/.gitlab/ci/custom.images.yml +++ b/.gitlab/ci/custom.images.yml @@ -30,6 +30,9 @@ gitlab-helm3.5-kubectl1.17: gitlab-puppeteer: extends: .build_and_deploy +gitlab-vscode-nodeless: + extends: .build_and_deploy + kaniko: extends: .build_and_deploy diff --git a/Dockerfile.gitlab-vscode-nodeless b/Dockerfile.gitlab-vscode-nodeless new file mode 100644 index 0000000..95cf3be --- /dev/null +++ b/Dockerfile.gitlab-vscode-nodeless @@ -0,0 +1,19 @@ +# This is based on the official Dockerfile image used to build VS Code. It is intended to be used +# for all of the GitLab builds related to VS Code, e.g. the Web IDE. +# +# The only change from the parent Dockerfile image is that we remove the default `apt` packages for +# node and yarn, as they are outdated and can conflict with newer installs (see +# https://github.com/nodesource/distributions/issues/1172). Node and yarn will installed by +# individual build jobs (just as they are in the offical VS Code builds). Hence the "nodeless" name. +# +# There does not seem to be public access to tags in the Azure Container Registry via +# `https://vscodehub.azurecr.io/acr/v1/vscode-linux-build-agent/_tags` (see +# https://docs.microsoft.com/en-us/rest/api/containerregistry/tag/get-list?tabs=HTTP). +# So, we are using the latest sha256 digest in order to guarantee we are using the +# same parent image. + +FROM vscodehub.azurecr.io/vscode-linux-build-agent:bionic-x64@sha256:e42bcc5245424a86febad3ae792809d8051733c49dee62a17115cc44415ae1b1 +MAINTAINER GitLab Editor Team + +RUN sudo apt-get update \ + && sudo apt autoremove -yq nodejs yarn