Adjust dockerfile

This commit is contained in:
Fred Boniface 2023-08-12 08:45:40 +01:00
parent c72a949529
commit bf6b027991
2 changed files with 34 additions and 0 deletions

26
.dockerignore Normal file
View File

@ -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

8
Dockerfile Normal file
View File

@ -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" ]