Skip to content

Commit

Permalink
Support multi-arch
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Sep 23, 2020
1 parent 84b4b63 commit 639c494
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
17 changes: 10 additions & 7 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Build Geth in a stock Go builder container
FROM golang:1.14-alpine as builder

ARG UPSTREAM_VERSION
FROM ethereum/client-go:${UPSTREAM_VERSION} as geth

# Pull Parity into a second stage deploy alpine container
RUN apk add --no-cache make gcc musl-dev linux-headers git && \
git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \
cd go-ethereum && make geth


FROM alpine:edge

RUN apk --no-cache add \
libstdc++ \
eudev-libs \
libgcc \
bash
libstdc++ eudev-libs libgcc bash

COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth
COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin

ENV SYNCMODE fast
ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS
1 change: 1 addition & 0 deletions dappnode_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"shortDescription": "Geth is the official Go implementation of the Ethereum protocol.",
"description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.",
"type": "library",
"architectures": ["linux/amd64", "linux/arm64"],
"chain": "ethereum",
"author": "DAppNode Association <[email protected]> (https://github.com/dappnode)",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: ./build
args:
- UPSTREAM_VERSION
- UPSTREAM_VERSION=v1.9.21
volumes:
- 'geth:/root/.ethereum'
environment:
Expand Down

0 comments on commit 639c494

Please sign in to comment.