From e40bfb4cd43d0f297a29144b4cad6ecdda47628f Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 5 Sep 2023 12:46:52 +0100 Subject: [PATCH] Add initial Dockerfile --- Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d0dd50c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +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" ] \ No newline at end of file