From bf6b02799147f17a0ea9ea8f695799b8157875cd Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sat, 12 Aug 2023 08:45:40 +0100 Subject: [PATCH] Adjust dockerfile --- .dockerignore | 26 ++++++++++++++++++++++++++ Dockerfile | 8 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9381fe5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,26 @@ +.env +map-dots +*.png +Dockerfile + +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..aea5f49 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM golang:alpine as builder +WORKDIR /build +COPY . . +RUN go build + +FROM scratch +COPY --from=builder /build/map-dots /bin/map-dots +CMD [ "/bin/map-dots", "--server" ] \ No newline at end of file