Files
hmq/Dockerfile
joy.zhou 333819b2f2 update
2019-07-15 12:07:37 +08:00

13 lines
268 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 1883
CMD ["/hmq"]