barcodes/Dockerfile
2023-09-06 01:38:46 +01:00

15 lines
319 B
Docker

# Build stage
FROM golang:latest as build
WORKDIR /build
COPY . .
RUN go test ./...
RUN CGO_ENABLED=0 go build .
# Final stage
FROM scratch
EXPOSE 8500
COPY --from=build /build/templates /bin/templates
COPY --from=build /build/static /bin/static
COPY --from=build /build/barcodes /bin/barcodes
CMD [ "/bin/barcodes" ]