Speed up build by using cache and updating ignores

This commit is contained in:
Jan Bader 2021-12-04 23:45:58 +00:00
parent 69bac9bc3f
commit 91a0c43d6d
3 changed files with 14 additions and 2 deletions

10
.dockerignore Normal file
View File

@ -0,0 +1,10 @@
build/
.git/
docker-compose.yml
README.md
Earthfile
config.example.json
.gitignore
.vscode/
budgeteer
budgeteer.exe

View File

@ -6,3 +6,5 @@ Earthfile
config.example.json config.example.json
.gitignore .gitignore
.vscode/ .vscode/
budgeteer
budgeteer.exe

View File

@ -5,7 +5,7 @@ build:
COPY go.mod go.sum . COPY go.mod go.sum .
RUN go mod download RUN go mod download
COPY . . COPY . .
RUN go build -o build/budgeteer ./cmd/budgeteer RUN --mount=type=cache,target=/root/.cache/go-build go build -o build/budgeteer ./cmd/budgeteer
SAVE ARTIFACT build/budgeteer /budgeteer AS LOCAL build/budgeteer SAVE ARTIFACT build/budgeteer /budgeteer AS LOCAL build/budgeteer
docker: docker: