forked from nats-io/nats-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (26 loc) · 1014 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM synadia/jsm:latest AS jsm
FROM golang:1.14-alpine3.11 AS builder
LABEL maintainer "Derek Collison <[email protected]>"
LABEL maintainer "Waldemar Quevedo <[email protected]>"
WORKDIR $GOPATH/src/github.com/nats-io/
RUN apk add -U --no-cache git binutils
RUN go get github.com/nats-io/nats-top
RUN go get -u -ldflags "-X main.version=0.3.16-nats-box" github.com/nats-io/nsc
RUN go get github.com/nats-io/stan.go/examples/stan-pub
RUN go get github.com/nats-io/stan.go/examples/stan-sub
# Simple tools
COPY . .
RUN go install
RUN strip /go/bin/*
FROM alpine:3.11
RUN apk add -U --no-cache ca-certificates figlet
COPY --from=builder /go/bin/* /usr/local/bin/
COPY --from=jsm /usr/local/bin/nats /usr/local/bin/
RUN cd /usr/local/bin/ && ln -s nats-box nats-pub && ln -s nats-box nats-sub && ln -s nats-box nats-req && ln -s nats-box nats-rply
WORKDIR /root
USER root
ENV NKEYS_PATH /nsc/nkeys
ENV NSC_HOME /nsc/accounts
ENV NATS_CONFIG_HOME /nsc/config
COPY .profile $WORKDIR
ENTRYPOINT ["/bin/sh", "-l"]