github.com/annchain/OG@v0.0.9/Dockerfile (about) 1 # Build OG from alpine based golang environment 2 FROM golang:1.12-alpine as builder 3 4 RUN apk add --no-cache make gcc musl-dev linux-headers git 5 6 ENV GOPROXY https://goproxy.io 7 ENV GO111MODULE on 8 9 WORKDIR /go/src/github.com/annchain/OG 10 COPY go.mod . 11 COPY go.sum . 12 RUN go mod download 13 14 COPY . . 15 RUN make og 16 17 # Copy OG into basic alpine image 18 FROM alpine:latest 19 20 RUN apk add --no-cache curl iotop busybox-extras 21 22 COPY --from=builder /go/src/github.com/annchain/OG/deployment/docker_private_server.toml /opt/config.toml 23 COPY --from=builder /go/src/github.com/annchain/OG/deployment/genesis.json /opt/ 24 COPY --from=builder /go/src/github.com/annchain/OG/build/og /opt/ 25 26 # for a temp running folder. This should be mounted from the outside 27 RUN mkdir /rw 28 29 EXPOSE 8000 8001/tcp 8001/udp 8002 8003 30 31 WORKDIR /opt 32 33 CMD ["./og", "--config", "/opt/config.toml", "--multifile_by_level", "--log_line_number", "--log_dir", "/rw/log/", "--datadir", "/rw/datadir_1", "--genkey", "run"] 34 35 36