echoip/Dockerfile

16 lines
340 B
Docker
Raw Normal View History

2018-07-30 01:02:57 +02:00
# Compile
2018-08-27 23:30:18 +02:00
FROM golang:1.11-alpine AS build
ADD . /go/src/github.com/mpolden/echoip
WORKDIR /go/src/github.com/mpolden/echoip
RUN apk --update add git gcc musl-dev
ENV GO111MODULE=on
RUN go get -d -v .
2018-07-30 01:02:57 +02:00
RUN go install ./...
# Run
FROM alpine
RUN mkdir -p /opt/
2018-08-27 23:30:18 +02:00
COPY --from=build /go/bin/echoip /opt/
2018-07-30 01:02:57 +02:00
WORKDIR /opt/
2018-08-27 23:30:18 +02:00
ENTRYPOINT ["/opt/echoip"]