echoip/Dockerfile

17 lines
345 B
Docker
Raw Normal View History

2018-12-28 19:04:36 +01:00
# Build
FROM golang:1.11-stretch AS build
2018-08-27 23:30:18 +02:00
WORKDIR /go/src/github.com/mpolden/echoip
2018-12-28 19:04:36 +01:00
COPY . .
ENV GO111MODULE=on CGO_ENABLED=0
2018-07-30 01:02:57 +02:00
RUN go install ./...
# Run
2018-12-28 19:04:36 +01:00
FROM scratch
EXPOSE 8080
COPY --from=build \
/go/bin/echoip \
/go/src/github.com/mpolden/echoip/index.html \
/opt/echoip/
WORKDIR /opt/echoip
ENTRYPOINT ["/opt/echoip/echoip"]