goStatic/Dockerfile
Christoph Wagner cdd0ff7904
Fix a warning with getaddrinfo while compiling
add netgo to the build
2018-05-06 00:16:54 +02:00

12 lines
356 B
Docker

# stage 0
FROM golang:latest as builder
WORKDIR /go/src/github.com/PierreZ/goStatic
COPY . .
RUN GOARCH=amd64 GOOS=linux go build -tags netgo -installsuffix netgo -ldflags "-linkmode external -extldflags -static -w"
# stage 1
FROM centurylink/ca-certs
WORKDIR /
COPY --from=builder /go/src/github.com/PierreZ/goStatic/goStatic .
ENTRYPOINT ["/goStatic"]