Files
hmq/Dockerfile
joy.zhou c547737ada update
2019-07-12 20:08:37 +08:00

13 lines
269 B
Docker

FROM golang:1.12 as builder
WORKDIR /go/src/github.com/fhmq/hmq
COPY . .
COPY ./vendor .
RUN CGO_ENABLED=0 go build -o hmq -a -ldflags '-extldflags "-static"' .
FROM alpine:3.8
WORKDIR /
COPY --from=builder /go/src/github.com/fhmq/hmq/hmq .
EXPOSE 50010
CMD ["/hmq"]