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

12 lines
283 B
Docker

FROM golang:1.17-alpine AS database
WORKDIR /go/src/app
COPY go.* .
COPY internal ./internal
RUN go mod download
COPY cmd/database .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o database .
FROM scratch
COPY --from=database /go/src/app/database /database
CMD ["/database"]