steve/Dockerfile

14 lines
398 B
Docker
Raw Normal View History

2019-08-08 05:42:29 +00:00
FROM golang:1.12.7 as build
2019-08-04 17:41:32 +00:00
COPY go.mod go.sum main.go /src/
COPY vendor /src/vendor/
COPY pkg /src/pkg/
RUN cd /src && \
2019-09-11 21:05:00 +00:00
CGO_ENABLED=0 go build -ldflags "-extldflags -static -s" -o /steve -mod=vendor
2019-08-04 17:41:32 +00:00
FROM alpine
2019-08-05 04:26:11 +00:00
RUN apk -U --no-cache add ca-certificates
2019-09-11 21:05:00 +00:00
COPY --from=build /steve /usr/bin/steve
2019-08-08 05:42:29 +00:00
# Hack to make golang do files,dns search order
ENV LOCALDOMAIN=""
2019-09-11 21:05:00 +00:00
ENTRYPOINT ["/usr/bin/steve"]