1
0
Fork 0
text-server/Dockerfile

17 lines
294 B
Docker
Raw Normal View History

2018-01-11 17:13:31 +08:00
FROM golang:1.9-alpine as go
WORKDIR /go/src/text-server
COPY . .
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
RUN go build -ldflags '-extldflags "-static"' -o text-server
FROM scratch
EXPOSE 8080
COPY --from=go /go/src/text-server/text-server text-server
ENTRYPOINT ["/text-server"]