basket-service/Dockerfile.builder
Piotr Biernat 19e44b60f0
Some checks failed
continuous-integration/drone/push Build is failing
Refactored docker image builder script
2022-11-30 02:07:53 +01:00

15 lines
385 B
Ruby

# Builder
FROM golang:alpine
ARG BIN_OUTPUT=/go/bin
ARG GO_SERVER=cmd/server/main.go
ARG GO_WORKER=cmd/worker/main.go
WORKDIR /go/src/app
COPY src ./
RUN go mod download && \
export CGO_ENABLED=0 ; export GOOS=linux ; export GOARCH=amd64 && \
go build -ldflags="-w -s" -o "$BIN_OUTPUT/server" $GO_SERVER && \
go build -ldflags="-w -s" -o "$BIN_OUTPUT/worker" $GO_WORKER