barcodes/Dockerfile

13 lines
287 B
Docker
Raw Normal View History

2023-09-05 12:46:52 +01:00
FROM golang:latest as build
WORKDIR /build
COPY . .
RUN go test ./...
RUN go build
FROM scratch
EXPOSE 8500
WORKDIR /app
COPY --from=build /build/templates /app/templates
COPY --from=build /build/static /app/static
COPY --from=build /build/barcodes /app/barcodes
CMD [ "/app/barcodes" ]