-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add go cache for improvement docker build performance (#2297)
* 🐳 Add go cache for improvement docker build performance Signed-off-by: vankichi <[email protected]> * 🐳 Fix Signed-off-by: vankichi <[email protected]> * 🐳 Fix Signed-off-by: vankichi <[email protected]> * 🐳 Add skip clean deps flag Signed-off-by: vankichi <[email protected]> * 🐳 Fix Signed-off-by: vankichi <[email protected]> * 🐳 Fix Signed-off-by: vankichi <[email protected]> * 🐳 remove Signed-off-by: vankichi <[email protected]> * 🐳 convert /tmp to /home/vankichi Signed-off-by: vankichi <[email protected]> --------- Signed-off-by: vankichi <[email protected]>
- Loading branch information
Showing
18 changed files
with
158 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,10 @@ ARG MAINTAINER="vdaas.org vald team <[email protected]>" | |
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/vscode/devcontainers/go:1 AS base | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ARG TARGETARCH | ||
|
||
ENV ARCH=${TARGETARCH} | ||
|
||
# skipcq: DOK-DL3008 | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
|
@@ -51,7 +55,9 @@ COPY versions versions | |
COPY hack/go.mod.default hack/go.mod.default | ||
|
||
# basic deps | ||
RUN make deps \ | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ | ||
make deps GO_CLEAN_DEPS=false \ | ||
&& make ngt/install \ | ||
&& make helm/install \ | ||
&& make helm-docs/install \ | ||
|
@@ -62,7 +68,9 @@ RUN make deps \ | |
&& make kubectl/install | ||
|
||
# additional deps | ||
RUN make k3d/install \ | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ | ||
make k3d/install \ | ||
&& make buf/install \ | ||
&& make k9s/install \ | ||
&& make minikube/install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.