diff --git a/Dockerfile b/Dockerfile index 5672384..f164271 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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