Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sirlegendary authored Oct 25, 2024
1 parent 5fed997 commit f3d6498
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ghcr.io/devopsplayground/base-container:latest

ARG ARCHITECTURE=amd64
ARG PRODUCT=terraform
ARG VERSION=1.9.8

# Install Terraform
RUN cd /tmp && \
wget https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_linux_${ARCHITECTURE}.zip && \
wget https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_SHA256SUMS && \
wget https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_SHA256SUMS.sig && \
wget -qO- https://www.hashicorp.com/.well-known/pgp-key.txt | gpg --import && \
gpg --verify ${PRODUCT}_${VERSION}_SHA256SUMS.sig ${PRODUCT}_${VERSION}_SHA256SUMS && \
grep ${PRODUCT}_${VERSION}_linux_${ARCHITECTURE}.zip ${PRODUCT}_${VERSION}_SHA256SUMS | sha256sum -c && \
unzip /tmp/${PRODUCT}_${VERSION}_linux_${ARCHITECTURE}.zip -d /tmp && \
mv /tmp/${PRODUCT} /usr/local/bin/${PRODUCT} && \
rm -f /tmp/${PRODUCT}_${VERSION}_linux_${ARCHITECTURE}.zip ${PRODUCT}_${VERSION}_SHA256SUMS ${VERSION}/${PRODUCT}_${VERSION}_SHA256SUMS.sig

# Install AWS CLI
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip && \
unzip awscliv2.zip && \
./aws/install

# Clone Playground repo
RUN cd /root/workdir && \
git clone https://github.com/DevOpsPlayground/chaos-engineering

# Verify installations
RUN terraform --version
RUN aws --version

0 comments on commit f3d6498

Please sign in to comment.