Dockerize

This commit is contained in:
2020-03-19 11:01:26 -04:00
parent 40a6aa0340
commit 743e0fe128
3 changed files with 131 additions and 3 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
# Build
FROM golang:1.14 as go_build
WORKDIR /build/
COPY main.go .
COPY go.mod .
RUN GOOS=linux CGO_ENABLED=0 go build -a -installsuffix cgo -o feed_archiver .
FROM scratch
WORKDIR /root/
COPY --from=go_build ["/build/feed_archiver", "/root/"]
CMD ["/root/feed_archiver"]