barcodes/Dockerfile

15 lines
319 B
Docker
Raw Normal View History

2023-09-06 01:38:46 +01:00
# Build stage
2023-09-05 12:46:52 +01:00
FROM golang:latest as build
WORKDIR /build
COPY . .
RUN go test ./...
2023-09-06 01:38:46 +01:00
RUN CGO_ENABLED=0 go build .
2023-09-05 12:46:52 +01:00
2023-09-06 01:38:46 +01:00
# Final stage
2023-09-05 12:46:52 +01:00
FROM scratch
EXPOSE 8500
2023-09-06 01:38:46 +01:00
COPY --from=build /build/templates /bin/templates
COPY --from=build /build/static /bin/static
COPY --from=build /build/barcodes /bin/barcodes
CMD [ "/bin/barcodes" ]