generated from codecrafters-io/course-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CC-1333 Add repository aware caching
- Loading branch information
1 parent
d751ce7
commit 13b2f88
Showing
3 changed files
with
18 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
FROM golang:1.19-alpine | ||
|
||
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum" | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod go.sum ./ | ||
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses | ||
COPY --exclude=.git --exclude=README.md . /app | ||
|
||
RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs -r go get | ||
Check failure on line 11 in dockerfiles/go-1.19.Dockerfile
|
||
|
||
|
||
# Once the heave steps are done, we can copy all files back | ||
COPY . /app |
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