Skip to content

Commit

Permalink
Merge pull request #10 from jinyangyang222/feature/reduce_terraform-b…
Browse files Browse the repository at this point in the history
…oot_dockerImageSize

reduce terraform-boot docker image size
  • Loading branch information
swaroopar authored Aug 22, 2023
2 parents 7369558 + 42fff0e commit ccb1d6c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM eclipse-temurin:17
FROM eclipse-temurin:17-jre-alpine

RUN apt-get update && \
apt-get install unzip wget -y
RUN addgroup -S terraform-boot && adduser -S -G terraform-boot terraform-boot
RUN apk update && \
apk add --no-cache unzip wget
ENV TERRAFORM_VERSION=1.4.4
RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
RUN unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip
RUN mv terraform /usr/bin/terraform
COPY target/terraform-boot-*.jar terraform-boot.jar
USER terraform-boot
ENTRYPOINT ["java","-jar","terraform-boot.jar"]

0 comments on commit ccb1d6c

Please sign in to comment.