build: 🏗️ use Docker multi-stage build
continuous-integration/drone/push Build is passing Details

main
RaviAnand Mohabir 1 year ago
parent f569af5316
commit 2f0c85eb6f

@ -1,4 +1,4 @@
FROM golang:1.21
FROM golang:1.21 as build
# Set destination for COPY
WORKDIR /app
@ -14,6 +14,10 @@ COPY . ./
# Build
RUN CGO_ENABLED=0 GOOS=linux go build -o /listy
FROM alpine
COPY --from=build /listy /listy
# Optional:
# To bind to a TCP port, runtime parameters must be supplied to the docker command.
# But we can document in the Dockerfile what ports

Loading…
Cancel
Save