You've already forked microservices
mirror of
https://github.com/ebosas/microservices.git
synced 2026-04-24 19:03:51 +02:00
13 lines
295 B
Docker
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"]
|