Skip to content

Commit

Permalink
dev: refactor the dockerfile for devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtoj committed Jul 31, 2023
1 parent 7b0aa5e commit ee51c8e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand Down

0 comments on commit ee51c8e

Please sign in to comment.