diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6c2b8c88af..72f1e94179 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,20 +4,20 @@ # Licensed under the MIT License. See LICENSE in the project root for license information. #----------------------------------------------------------------------------------------- -FROM ubuntu:bionic +FROM debian:9 # Install git RUN apt-get update \ && apt-get install -y git -# Install Docker CE CLI. If you choose a Debian based image, update https://download.docker.com/linux/ubuntu -# to https://download.docker.com/linux/debian on the third line below. +# Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli + # Clean up RUN apt-get autoremove -y \ && apt-get clean -y \ diff --git a/awk b/awk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/container-templates/docker-compose/.devcontainer/Dockerfile b/container-templates/docker-compose/.devcontainer/Dockerfile index 1857ebf22a..4394c6a49b 100644 --- a/container-templates/docker-compose/.devcontainer/Dockerfile +++ b/container-templates/docker-compose/.devcontainer/Dockerfile @@ -9,7 +9,7 @@ # ************************************************************************** # Debian and Ubuntu based images are supported. Alpine images are not yet supported. -FROM ubuntu:bionic +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps diff --git a/container-templates/dockerfile/.devcontainer/Dockerfile b/container-templates/dockerfile/.devcontainer/Dockerfile index 459734f1d9..80632b8591 100644 --- a/container-templates/dockerfile/.devcontainer/Dockerfile +++ b/container-templates/dockerfile/.devcontainer/Dockerfile @@ -4,7 +4,7 @@ #----------------------------------------------------------------------------------------- # Debian and Ubuntu based images are supported. Alpine images are not yet supported. -FROM ubuntu:bionic +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps diff --git a/containers/azure-machine-learning-python-3/.devcontainer/Dockerfile b/containers/azure-machine-learning-python-3/.devcontainer/Dockerfile index 906f1cdd9f..c7bd82076b 100644 --- a/containers/azure-machine-learning-python-3/.devcontainer/Dockerfile +++ b/containers/azure-machine-learning-python-3/.devcontainer/Dockerfile @@ -3,18 +3,19 @@ # Licensed under the MIT License. See LICENSE in the project root for license information. #----------------------------------------------------------------------------------------- -FROM python:3.7-slim +FROM python:3 # Install git, process tools RUN apt-get update && apt-get -y install git procps -# Install Docker CE - ** COMMENT OUT IF YOU WILL ONLY RUN LOCAL OR IN AZURE ** +# [Optional] Install Docker CE - Remove if you won't be doing local testing RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli + # Install pylint RUN pip install pylint diff --git a/containers/azure-terraform/.devcontainer/Dockerfile b/containers/azure-terraform/.devcontainer/Dockerfile index 1980cad53b..330337d59a 100644 --- a/containers/azure-terraform/.devcontainer/Dockerfile +++ b/containers/azure-terraform/.devcontainer/Dockerfile @@ -25,12 +25,14 @@ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh && nvm install lts/* \ && nvm alias default lts/*" +# [Optional] For local testing instead of cloud shell # Install Docker CE CLI. -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ +RUN && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ - && apt-get install -y docker-ce-cli + && apt-get install -y docker-ce-cli +# [Optional] For local testing instead of cloud shell # Install the Azure CLI RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ && curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ @@ -39,10 +41,10 @@ RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(ls # Install Terraform and tflint RUN mkdir -p /tmp/docker-downloads \ - && curl -sSL -o /tmp/docker-downloads/terraform.zip https://releases.hashicorp.com/terraform/0.11.11/terraform_0.11.11_linux_amd64.zip \ + && curl -sSL -o /tmp/docker-downloads/terraform.zip https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip \ && unzip /tmp/docker-downloads/terraform.zip \ && mv terraform /usr/local/bin \ - && curl -sSL -o /tmp/docker-downloads/tflint.zip https://github.com/wata727/tflint/releases/download/v0.7.4/tflint_linux_amd64.zip \ + && curl -sSL -o /tmp/docker-downloads/tflint.zip https://github.com/wata727/tflint/releases/download/v0.7.5/tflint_linux_amd64.zip \ && unzip /tmp/docker-downloads/tflint.zip \ && mv tflint /usr/local/bin \ && cd ~ \ diff --git a/containers/cpp/.devcontainer/Dockerfile b/containers/cpp/.devcontainer/Dockerfile index aaeaee1dea..a68782b562 100644 --- a/containers/cpp/.devcontainer/Dockerfile +++ b/containers/cpp/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE in the project root for license information. #----------------------------------------------------------------------------------------- -FROM ubuntu:bionic +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps diff --git a/containers/docker-in-docker-compose/.devcontainer/Dockerfile b/containers/docker-in-docker-compose/.devcontainer/Dockerfile index 84c281df5a..44f36261a2 100644 --- a/containers/docker-in-docker-compose/.devcontainer/Dockerfile +++ b/containers/docker-in-docker-compose/.devcontainer/Dockerfile @@ -4,16 +4,15 @@ #----------------------------------------------------------------------------------------- # Note: You can use any Debian/Ubuntu based image you want. -FROM ubuntu:bionic +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps -# Install Docker CE CLI. If you choose a Debian based image, update https://download.docker.com/linux/ubuntu -# to https://download.docker.com/linux/debian on the third line below. +# Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli diff --git a/containers/docker-in-docker-compose/README.md b/containers/docker-in-docker-compose/README.md index 9f35ed0d19..5ea70aa359 100644 --- a/containers/docker-in-docker-compose/README.md +++ b/containers/docker-in-docker-compose/README.md @@ -22,41 +22,27 @@ Dev containers can be useful for all types of applications including those that If you prefer, you can also just look through the contents of the `.devcontainer` folder to understand how to make changes to your own project. -No additional setup steps are required, but note that the included `.devcontainer/Dockerfile` can be altered to work with other Debian/Ubuntu-based container images such as `node` or `python`. First, update the `FROM` statement to reference the new base image. For example: - ```Dockerfile FROM node:8 ``` -Next, if you choose an image that is Debian based instead of Ubuntu, you will need to update this line... - -``` - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ -``` - -...to ... - -``` - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ -``` - See the [Docker CE installation steps for Linux](https://docs.docker.com/install/linux/docker-ce/debian/) for details on other distributions. Note that you only need the Docker CLI in this particular case. ## How it works The trick that makes this work is as follows: -1. First, install the Docker CLI in the container. From `dev-container.dockerfile`: +1. First, install the Docker CLI in the container. From `.devcontainer/Dockerfile`: ```Dockerfile - # Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli ``` -2. Then just forward the Docker socket by mounting it in the container. From `docker-compose.dev-container.yml`: + +2. Then just forward the Docker socket by mounting it in the container. From `.devcontainer/docker-compose.yml`: ```yaml volumes: diff --git a/containers/docker-in-docker/.devcontainer/Dockerfile b/containers/docker-in-docker/.devcontainer/Dockerfile index c516278432..d6a154f718 100644 --- a/containers/docker-in-docker/.devcontainer/Dockerfile +++ b/containers/docker-in-docker/.devcontainer/Dockerfile @@ -5,16 +5,15 @@ #----------------------------------------------------------------------------------------- # Note: You can use any Debian/Ubuntu based image you want. -FROM ubuntu:bionic +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps -# Install Docker CE CLI. If you choose a Debian based image, update https://download.docker.com/linux/ubuntu -# to https://download.docker.com/linux/debian on the third line below. +# Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli diff --git a/containers/docker-in-docker/README.md b/containers/docker-in-docker/README.md index 57981f8ea8..a4a0d2f82e 100644 --- a/containers/docker-in-docker/README.md +++ b/containers/docker-in-docker/README.md @@ -28,35 +28,25 @@ No additional setup steps are required, but note that the included `.devcontaine FROM node:8 ``` -Next, if you choose an image that is Debian based instead of Ubuntu, you will need to update this line... - -``` - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ -``` - -...to ... - -``` - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ -``` - See the [Docker CE installation steps for Linux](https://docs.docker.com/install/linux/docker-ce/debian/) for details on other distributions. Note that you only need the Docker CLI in this particular case. ## How it works The trick that makes this work is as follows: -1. First, install the Docker CLI in the container. From `dev-container.dockerfile`: +1. First, install the Docker CLI in the container. From `.devcontainer/Dockerfile`: ```Dockerfile # Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli + ``` -2. Then just forward the Docker socket by mounting it in the container. From `devContainer.json`: + +2. Then just forward the Docker socket by mounting it in the container. From `.devcontainer/devcontainer.json`: ```json "runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] diff --git a/containers/javascript-node-8/.devcontainer/Dockerfile b/containers/javascript-node-8/.devcontainer/Dockerfile index 8c24fa267c..d1810333a2 100644 --- a/containers/javascript-node-8/.devcontainer/Dockerfile +++ b/containers/javascript-node-8/.devcontainer/Dockerfile @@ -10,8 +10,8 @@ RUN apt-get update && apt-get -y install git procps # Install yarn RUN apt-get install -y curl apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && apt-get update \ && apt-get install -y yarn diff --git a/containers/javascript-node-lts-mongo/.devcontainer/Dockerfile b/containers/javascript-node-lts-mongo/.devcontainer/Dockerfile index 5abdbd293e..090fd11888 100644 --- a/containers/javascript-node-lts-mongo/.devcontainer/Dockerfile +++ b/containers/javascript-node-lts-mongo/.devcontainer/Dockerfile @@ -10,8 +10,8 @@ RUN apt-get update && apt-get -y install git procps # Install yarn RUN apt-get install -y curl apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && apt-get update \ && apt-get install -y yarn diff --git a/containers/javascript-node-lts/.devcontainer/Dockerfile b/containers/javascript-node-lts/.devcontainer/Dockerfile index 8c24fa267c..d1810333a2 100644 --- a/containers/javascript-node-lts/.devcontainer/Dockerfile +++ b/containers/javascript-node-lts/.devcontainer/Dockerfile @@ -10,8 +10,8 @@ RUN apt-get update && apt-get -y install git procps # Install yarn RUN apt-get install -y curl apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && apt-get update \ && apt-get install -y yarn diff --git a/containers/kubernetes-helm/.devcontainer/Dockerfile b/containers/kubernetes-helm/.devcontainer/Dockerfile index 85e0052c13..e2442c7208 100644 --- a/containers/kubernetes-helm/.devcontainer/Dockerfile +++ b/containers/kubernetes-helm/.devcontainer/Dockerfile @@ -3,23 +3,23 @@ # Licensed under the MIT License. See LICENSE in the project root for license information. #----------------------------------------------------------------------------------------- -FROM ubuntu:bionic +# You can use any Debian/Ubuntu based image as abase +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps -# Install Docker CE CLI. If you choose a Debian based image, update https://download.docker.com/linux/ubuntu -# to https://download.docker.com/linux/debian on the third line below. +# Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli # Install kubectl RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \ - && echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \ + && echo "deb https://apt.kubernetes.io/ kubernetes-$(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/kubernetes.list \ && apt-get update \ && apt-get install -y kubectl diff --git a/containers/kubernetes-helm/README.md b/containers/kubernetes-helm/README.md index 3cd1b61c90..66d7c491e2 100644 --- a/containers/kubernetes-helm/README.md +++ b/containers/kubernetes-helm/README.md @@ -24,7 +24,9 @@ To get started, follow the appropriate steps below for your operating system. First, install the **[Visual Studio Code Remote Development](https://aka.ms/vscode-remote/download/extension)** extension pack if you have not already. -To try out the definition with an existing project, copy the `.devcontainer` folder into your project root and then follow the OS specific directions below. +To try out the definition with an existing project, copy the `.devcontainer` folder into your project root and then follow the OS specific directions below. + +> **Note:** If you want to disable sync'ing local Kubernetes config into the container, remove `"-e", "SYNC_LOCALHOST_KUBECONFIG=true",` from `runArgs` in `.devcontainer/devcontainer.json`. ### macOS / Windows Setup @@ -62,19 +64,19 @@ To try out the definition with an existing project, copy the `.devcontainer` f The trick that makes this work is as follows: -1. First, install all of the needed CLIs in the container. From `dev-container.dockerfile`: +1. First, install all of the needed CLIs in the container. From `.devcontainer/Dockerfile`: ```Dockerfile # Install Docker CE CLI RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli # Install kubectl RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \ - && echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \ + && echo "deb https://apt.kubernetes.io/ kubernetes-$(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/kubernetes.list \ && apt-get update \ && apt-get install -y kubectl @@ -82,7 +84,7 @@ The trick that makes this work is as follows: RUN curl -s https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash - ``` -2. Next, forward the local Docker socket and mount the local `.kube` folder in the container so the configuration can be reused. From `devContainer.json`: +2. Next, forward the local Docker socket and mount the local `.kube` folder in the container so the configuration can be reused. From `.devcontainer/devcontainer.json`: ```json "runArgs": ["-e", "SYNC_LOCALHOST_KUBECONFIG=true", @@ -90,7 +92,7 @@ The trick that makes this work is as follows: "-v", "$HOME/.kube:/root/.kube-localhost"] ``` -3. Finally, update `.bashrc` to automatically swap out localhost for host.docker.internal in a containr copy of the Kubernetes config. From `dev-container.dockerfile`: +3. Finally, update `.bashrc` to automatically swap out localhost for host.docker.internal in a containr copy of the Kubernetes config. From `.devcontainer/Dockerfile`: ```Dockerfile RUN echo 'if [ "$SYNC_LOCALHOST_KUBECONFIG" == "true" ]; then \ diff --git a/containers/markdown/.devcontainer/Dockerfile b/containers/markdown/.devcontainer/Dockerfile index c980ff48bb..20846f708c 100644 --- a/containers/markdown/.devcontainer/Dockerfile +++ b/containers/markdown/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE in the project root for license information. #----------------------------------------------------------------------------------------- -FROM ubuntu:bionic +FROM debian:9 # Install git, process tools RUN apt-get update && apt-get -y install git procps diff --git a/containers/typescript-node-8/.devcontainer/Dockerfile b/containers/typescript-node-8/.devcontainer/Dockerfile index 16a60d6b8e..6354da6ddb 100644 --- a/containers/typescript-node-8/.devcontainer/Dockerfile +++ b/containers/typescript-node-8/.devcontainer/Dockerfile @@ -10,8 +10,8 @@ RUN apt-get update && apt-get -y install git procps # Install yarn RUN apt-get install -y apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && apt-get update \ && apt-get install -y yarn diff --git a/containers/typescript-node-lts/.devcontainer/Dockerfile b/containers/typescript-node-lts/.devcontainer/Dockerfile index 16a60d6b8e..6354da6ddb 100644 --- a/containers/typescript-node-lts/.devcontainer/Dockerfile +++ b/containers/typescript-node-lts/.devcontainer/Dockerfile @@ -10,8 +10,8 @@ RUN apt-get update && apt-get -y install git procps # Install yarn RUN apt-get install -y apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && apt-get update \ && apt-get install -y yarn