Files
hmq/Dockerfile
muXxer a95c028cb8 Update to Go 1.18 and replace fnv-1a with xxhash (#158)
* Update modules and go 1.18

* Use xxhash instead of fnv-1a

* Update go version in dockerfile and github workflow
2022-04-25 20:37:22 +08:00

13 lines
256 B
Docker

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