2 # docker build -t bytom .
6 # Build Bytom in a stock Go builder container
7 FROM golang:1.9-alpine as builder
9 RUN apk add --no-cache make git
11 ADD . /go/src/github.com/bytom
12 RUN cd /go/src/github.com/bytom && make bytomd && make bytomcli
14 # Pull Bytom into a second stage deploy alpine container
17 RUN apk add --no-cache ca-certificates
18 COPY --from=builder /go/src/github.com/bytom/cmd/bytomd/bytomd /usr/local/bin/
19 COPY --from=builder /go/src/github.com/bytom/cmd/bytomcli/bytomcli /usr/local/bin/
21 EXPOSE 1999 46656 46657 9888
26 # if u r running the container the first time plz init it with 'bytomd init --chain_id testnet' and then run 'bytomd node --help' for further instructions.
30 # docker run -it -p 9888:9888 -v ~/.bytomd:/.bytomd bytom:latest
31 # bytomd init --chain_id testnet
32 # bytomd node --web.closed --auth.disable
35 # docker run -d -p 9888:9888 -v ~/.bytomd:/.bytomd bytom:latest bytomd node --web.closed --auth.disable
37 # docker stop <containerId>