You've already forked microservices
mirror of
https://github.com/ebosas/microservices.git
synced 2025-06-24 22:26:56 +02:00
12 lines
262 B
Docker
12 lines
262 B
Docker
![]() |
FROM golang:1.16-alpine AS cache
|
||
|
WORKDIR /go/src/app
|
||
|
COPY go.* .
|
||
|
COPY internal ./internal
|
||
|
RUN go mod download
|
||
|
COPY cmd/cache .
|
||
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o cache .
|
||
|
|
||
|
FROM scratch
|
||
|
COPY --from=cache /go/src/app/cache /cache
|
||
|
CMD ["/cache"]
|