mirror of
https://github.com/TeamPiped/instances-api.git
synced 2024-08-14 23:57:19 +00:00
Use BuildKit's cache mount.
This commit is contained in:
parent
422e1a3d1d
commit
2a56a2756d
1 changed files with 2 additions and 5 deletions
|
@ -2,13 +2,10 @@ FROM golang:latest AS build
|
|||
|
||||
WORKDIR /app/
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go build -ldflags "-s -w" main.go
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
go build -ldflags "-s -w" main.go
|
||||
|
||||
FROM debian:unstable-slim
|
||||
|
||||
|
|
Loading…
Reference in a new issue