1
0
mirror of https://github.com/ebosas/microservices.git synced 2024-11-30 08:06:44 +02:00
microservices/cache.Dockerfile
2021-10-11 13:32:47 +03:00

12 lines
262 B
Docker

FROM golang:1.17-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"]