From ee51c8e03e0a22c012e5f5b39f7ce98b2e543e51 Mon Sep 17 00:00:00 2001 From: Brian Ojeda <9335829+sgtoj@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:19:26 +0000 Subject: [PATCH] dev: refactor the dockerfile for devcontainer --- .devcontainer/Dockerfile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d49b64a..1ee059e 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,24 +1,13 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:1-focal -# Install AWS CLI +# install aws RUN apt-get update && \ apt-get install -y unzip python3-pip && \ pip3 install --no-cache-dir --upgrade awscli && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -# Install Node.js -ENV NODE_VERSION=18.x -RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - && \ - apt-get install -y nodejs - -# Install TypeScript -RUN npm install -g typescript - -# Install Docker CLI -COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/ - -# Install Terraform +# install terraform ENV TERRAFORM_VERSION=1.5.1 ENV TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache RUN mkdir -p $TF_PLUGIN_CACHE_DIR @@ -29,7 +18,18 @@ RUN SYSTEM_ARCH=$(dpkg --print-architecture) \ && terraform version \ && rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip -# Verify that everything was installed correctly +# install docker +COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/ + +# install node.js +ENV NODE_VERSION=18.x +RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - && \ + apt-get install -y nodejs + +# install typescript +RUN npm install -g typescript + +# verify installs RUN terraform --version \ && aws --version \ && node --version \