FROM golang:1.11-alpine3.8 as builder WORKDIR /go/src/git.trj.tw/golang/ipgo COPY . . RUN apk add --no-cache make git \ && go get ./... RUN go build -o ipgo . FROM alpine:latest RUN apk add --no-cache ca-certificates WORKDIR /data COPY --from=builder /go/src/git.trj.tw/golang/ipgo/ipgo /usr/bin/ EXPOSE 8080 CMD ["/usr/bin/ipgo"]