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

12 lines
283 B
Docker
Raw Normal View History

2021-10-11 13:32:47 +03:00
FROM golang:1.17-alpine AS database
2021-06-01 14:26:02 +03:00
WORKDIR /go/src/app
2021-06-08 21:26:14 +03:00
COPY go.* .
COPY internal ./internal
2021-06-01 14:26:02 +03:00
RUN go mod download
2021-06-08 21:26:14 +03:00
COPY cmd/database .
2021-06-01 14:26:02 +03:00
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o database .
FROM scratch
COPY --from=database /go/src/app/database /database
CMD ["/database"]