Add docker-build caching
This commit is contained in:
parent
ea4921f3ba
commit
f43969f7c9
@ -7,6 +7,7 @@ RUN go mod download
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go env -w CGO_ENABLED=1
|
RUN go env -w CGO_ENABLED=1
|
||||||
RUN go build -o app ./cmd/app
|
ENV GOCACHE=/root/.cache/go-build
|
||||||
|
RUN --mount=type=cache,target="/root/.cache/go-build" go build -o app ./cmd/app
|
||||||
WORKDIR /storage
|
WORKDIR /storage
|
||||||
CMD ["/build/app"]
|
CMD ["/build/app"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user