echoip/Dockerfile

17 lines
319 B
Docker
Raw Normal View History

2018-12-28 19:04:36 +01:00
# Build
2019-03-16 12:31:46 +01:00
FROM golang:1.12-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
RUN make
2018-07-30 01:02:57 +02:00
# 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"]