Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
eduadiez committed Jul 24, 2021
2 parents 31893c6 + 76da62b commit c92decd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 55 deletions.
11 changes: 8 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ services:
args:
UPSTREAM_VERSION: v2021.07.04
ports:
- "30303"
- 30303/udp
- "30303:30303/tcp"
- "30303:30303/udp"
- "30304:30304/tcp"
- "30304:30304/udp"
restart: unless-stopped
volumes:
- "data:/var/lib"
- "data:/var/lib/erigon"
environment:
ERIGON_EXTRA_OPTS: ""
rpcdaemon:
Expand All @@ -23,5 +25,8 @@ services:
environment:
RPCDAEMON_EXTRA_OPTS: "--http.api=eth,debug,net,web3"
restart: unless-stopped
volumes:
- "rpc:/var/lib/erigon"
volumes:
data: {}
rpc: {}
36 changes: 9 additions & 27 deletions erigon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
FROM golang:1.16-alpine3.13 as builder
ARG UPSTREAM_VERSION

ARG git_commit
ENV GIT_COMMIT=$git_commit
FROM thorax/erigon:${UPSTREAM_VERSION}

ARG git_branch
ENV GIT_BRANCH=$git_branch

# for linters to avoid warnings. we won't use linters in Docker anyway
ENV LATEST_COMMIT="undefined"

ARG UPSTREAM_VERSION

RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++

WORKDIR /app

RUN git clone -b ${UPSTREAM_VERSION} --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git /app
RUN go mod download
RUN make all

FROM alpine:3.13

RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata

COPY --from=builder /app/build/bin/* /usr/local/bin/

ENTRYPOINT [ "sh", "-c", "exec erigon \
ENTRYPOINT [ "sh", "-c", "exec erigon \
--datadir=/var/lib/erigon \
--metrics \
--metrics.addr=\"0.0.0.0\" \
--metrics.port=\"6060\" \
--private.api.addr=\"0.0.0.0:9090\" \
${ERIGON_EXTRA_OPTS}" ]
--pprof \
--pprof.addr=0.0.0.0 \
--pprof.port=6061 \
${ERIGON_EXTRA_OPTS}" ]

27 changes: 2 additions & 25 deletions rpcdaemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
FROM golang:1.16-alpine3.13 as builder
ARG UPSTREAM_VERSION

ARG git_commit
ENV GIT_COMMIT=$git_commit

ARG git_branch
ENV GIT_BRANCH=$git_branch

# for linters to avoid warnings. we won't use linters in Docker anyway
ENV LATEST_COMMIT="undefined"

ARG UPSTREAM_VERSION

RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++

WORKDIR /app

RUN git clone -b ${UPSTREAM_VERSION} --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git /app
RUN go mod download
RUN make all

FROM alpine:3.13

RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata

COPY --from=builder /app/build/bin/* /usr/local/bin/
FROM thorax/erigon:${UPSTREAM_VERSION}

ENTRYPOINT [ "sh", "-c", "exec rpcdaemon \
--private.api.addr=\"erigon:9090\" \
Expand Down

0 comments on commit c92decd

Please sign in to comment.