15 lines
319 B
Docker
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" ]
|