Add Dockerfile

This commit is contained in:
parmarrushabh 2018-08-22 15:38:42 +05:30
parent 8b71594e11
commit 6855e21c0b

View file

@ -1,16 +1,22 @@
# Build Geth in a stock Go builder container
# Build XDC in a stock Go builder container
FROM golang:1.10-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers
ADD . /go-ethereum
RUN cd /go-ethereum && make geth
ADD . /XDC
RUN cd /XDC && make XDC
# Pull Geth into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
LABEL maintainer="admin@xinfin.org"
COPY --from=builder /tomochain/build/bin/XDC /usr/local/bin/XDC
RUN chmod +x /usr/local/bin/XDC
EXPOSE 8545
EXPOSE 30303
ENTRYPOINT ["/usr/local/bin/XDC", "--help"]
EXPOSE 8545 8546 30303 30303/udp 30304/udp
ENTRYPOINT ["geth"]