ipgo/Dockerfile

14 lines
334 B
Docker
Raw Permalink Normal View History

2019-05-03 06:30:54 +00:00
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"]