Skip to content

Commit

Permalink
Updates for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
genechain-dev committed May 18, 2021
1 parent 2485834 commit 171dd97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Build Geth in a stock Go builder container
# Build Geneth in a stock Go builder container
FROM golang:1.15-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers git

ADD . /go-ethereum
RUN cd /go-ethereum && make geth
ADD . /geneth
RUN cd /geneth && make geneth

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest

RUN apk add --no-cache ca-certificates logrotate
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
COPY --from=builder /geneth/build/bin/geth /usr/local/bin/
COPY --from=builder /geneth/build/bin/geneth /usr/local/bin/

EXPOSE 8545 8546 30303 30303/udp
ENTRYPOINT ["geth"]
ENTRYPOINT ["geneth"]
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ with an upper limit of 21.
Nodes responsible for producing and packaging blocks for transactions on the
chain.

## Docker quick start
Docker image of geneth is now available on
https://hub.docker.com/r/genechain/geneth. You can get GeneChain up and running
on your machine with the following command.

```
docker run -d --name genechain-node -v /Users/alice/genechain:/root \
-p 8545:8545 -p 30303:30303 \
genechain/geneth
```

Remember to replace `/Users/alice/genechain` with a path to the folder where you
want your blockchain to be stored.

If you want to access RPC from other containers and/or hosts, append
`--http.addr 0.0.0.0` to the docker command. More on running `geneth` can be
found in [Running geneth](#running-geneth).

## Building the source

Building `geneth` requires both a Go (version 1.13 or later) and a C compiler. You can install
Expand Down

0 comments on commit 171dd97

Please sign in to comment.