Created
March 31, 2022 09:06
-
-
Save developer-guy/34d6d7aae831965b3365ea801b2291b0 to your computer and use it in GitHub Desktop.
mount cache types
This file contains hidden or 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
.. | |
# will cache go packages while downloading packages | |
RUN --mount=type=cache,target=/go/pkg/mod go mod download | |
# will cache build ouputs and go packages while building the binary | |
RUN --mount=type=cache,target=/root/.cache/go-build \ | |
--mount=type=cache,target=/go/pkg/mod \ | |
go build -o /out/example . | |
.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment