1
0
mirror of https://github.com/ebosas/microservices.git synced 2026-04-24 19:03:51 +02:00
Files
microservices/database.Dockerfile
T
2021-06-08 21:26:14 +03:00

13 lines
295 B
Docker

FROM golang:1.16-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
EXPOSE 8080
CMD ["/database"]