Skip to content

Commit

Permalink
Merge pull request #102 from tamirkamara/build-with-mount
Browse files Browse the repository at this point in the history
Build using mount cache
  • Loading branch information
carolynvs committed Dec 6, 2022
2 parents 002b07b + cc1b801 commit 45f6c31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/terraform/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
)

const dockerfileLines = `
RUN apt-get update && apt-get install -y wget unzip && \
apt-get clean -y && rm -rf /var/lib/apt/lists/* && \
wget https://releases.hashicorp.com/terraform/{{.ClientVersion}}/terraform_{{.ClientVersion}}_linux_amd64.zip && \
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get update && apt-get install -y wget unzip && \
wget https://releases.hashicorp.com/terraform/{{.ClientVersion}}/terraform_{{.ClientVersion}}_linux_amd64.zip --progress=dot:giga && \
unzip terraform_{{.ClientVersion}}_linux_amd64.zip -d /usr/bin && \
rm terraform_{{.ClientVersion}}_linux_amd64.zip
COPY {{.WorkingDir}}/{{.InitFile}} $BUNDLE_DIR/{{.WorkingDir}}/
Expand Down

0 comments on commit 45f6c31

Please sign in to comment.