1
0
mirror of https://github.com/ebosas/microservices.git synced 2025-06-24 22:26:56 +02:00
Files
microservices/cache.Dockerfile

12 lines
262 B
Docker
Raw Normal View History

2021-10-11 13:32:47 +03:00
FROM golang:1.17-alpine AS cache
2021-10-10 18:49:39 +03:00
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"]