Add dockerfile to the project

This commit is contained in:
Robert Brown 2019-07-26 15:49:54 +01:00
parent 55f887a895
commit c5ec1da52d

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM golang:1.12.7-stretch
WORKDIR /
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN GOOS=linux GO111MODULE=on go build -o /mbtileserver
FROM alpine:3.10.1
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
COPY --from=0 /mbtileserver /mbtileserver
WORKDIR /
CMD ["/mbtileserver"]