Skip to content

Commit cc1b801

Browse files
committed
build using mount cache
Signed-off-by: Tamir Kamara <[email protected]>
1 parent 002b07b commit cc1b801

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)