Skip to content

Commit 45f6c31

Browse files
authored
Merge pull request #102 from tamirkamara/build-with-mount
Build using mount cache
2 parents 002b07b + cc1b801 commit 45f6c31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/terraform/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
)
1111

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

0 commit comments

Comments
 (0)