get.pme.sh/pnats@v0.0.0-20240304004023-26bb5a137ed0/docker/Dockerfile.nightly (about) 1 FROM golang:1.21-alpine AS builder 2 3 ARG VERSION="nightly" 4 5 RUN apk add --update git 6 RUN mkdir -p src/github.com/nats-io && \ 7 cd src/github.com/nats-io/ && \ 8 git clone https://github.com/nats-io/natscli.git && \ 9 cd natscli/nats && \ 10 go build -ldflags "-w -X main.version=${VERSION}" -o /nats 11 12 RUN go install github.com/nats-io/nsc/v2@latest 13 14 FROM alpine:latest 15 16 RUN apk add --update ca-certificates && mkdir -p /nats/bin && mkdir /nats/conf 17 18 COPY docker/nats-server.conf /nats/conf/nats-server.conf 19 COPY nats-server /bin/nats-server 20 COPY --from=builder /nats /bin/nats 21 COPY --from=builder /go/bin/nsc /bin/nsc 22 23 EXPOSE 4222 8222 6222 5222 24 25 ENTRYPOINT ["/bin/nats-server"] 26 CMD ["-c", "/nats/conf/nats-server.conf"]