-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: refactor devcontainer and mount aws config from host for devcont…
…ainer
- Loading branch information
Showing
2 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
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 Python Packages | ||
RUN python3 -m pip install \ | ||
boto3 \ | ||
black | ||
|
||
# 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 | ||
RUN SYSTEM_ARCH=$(dpkg --print-architecture) \ | ||
&& mkdir -p $TF_PLUGIN_CACHE_DIR \ | ||
&& curl -OL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip \ | ||
&& unzip terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip \ | ||
&& mv terraform /usr/local/bin/ \ | ||
&& terraform version \ | ||
&& rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip | ||
|
||
# Verify Installs | ||
# install docker | ||
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/ | ||
|
||
# install python packages | ||
RUN python3 -m pip install \ | ||
boto3 \ | ||
black | ||
|
||
# verify installs | ||
RUN terraform --version \ | ||
&& aws --version \ | ||
&& docker --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters