Skip to content

Commit fca049d

Browse files
Merge pull request #1 from chainstack/feature/modify-base-dockerfile
modify base image
2 parents bc9bc06 + 1197992 commit fca049d

File tree

1 file changed

+5
-48
lines changed

1 file changed

+5
-48
lines changed

Dockerfile

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,8 @@
1-
FROM golang:1.21 as op
1+
FROM ghcr.io/base-org/node:v0.9.0
22

3-
WORKDIR /app
4-
5-
ENV REPO=https://github.com/ethereum-optimism/optimism.git
6-
ENV VERSION=v1.7.6
7-
# for verification:
8-
ENV COMMIT=4a487b8920daa9dc4b496d691d5f283f9bb659b1
9-
10-
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
11-
git switch -c branch-$VERSION && \
12-
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
13-
14-
RUN cd op-node && \
15-
make VERSION=$VERSION op-node
16-
17-
FROM golang:1.21 as geth
18-
19-
WORKDIR /app
20-
21-
ENV REPO=https://github.com/ethereum-optimism/op-geth.git
22-
ENV VERSION=v1.101315.1
23-
# for verification:
24-
ENV COMMIT=3fbae78d638d1b903e702a14f98644c1103ae1b3
25-
26-
# avoid depth=1, so the geth build can read tags
27-
RUN git clone $REPO --branch $VERSION --single-branch . && \
28-
git switch -c branch-$VERSION && \
29-
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
30-
31-
RUN go run build/ci.go install -static ./cmd/geth
32-
33-
FROM golang:1.21
3+
USER root
344

355
RUN apt-get update && \
36-
apt-get install -y jq curl supervisor && \
37-
rm -rf /var/lib/apt/lists
38-
RUN mkdir -p /var/log/supervisor
39-
40-
WORKDIR /app
41-
42-
COPY --from=op /app/op-node/bin/op-node ./
43-
COPY --from=geth /app/build/bin/geth ./
44-
RUN cd /etc/supervisor/conf.d/ && wget https://raw.githubusercontent.com/base-org/node/main/supervisord.conf
45-
RUN wget https://raw.githubusercontent.com/base-org/node/main/geth-entrypoint
46-
RUN wget https://raw.githubusercontent.com/base-org/node/main/op-node-entrypoint
47-
RUN mkdir mainnet sepolia
48-
RUN cd mainnet && wget https://raw.githubusercontent.com/base-org/node/main/mainnet/genesis-l2.json && wget https://raw.githubusercontent.com/base-org/node/main/mainnet/rollup.json
49-
RUN cd sepolia && wget https://raw.githubusercontent.com/base-org/node/main/sepolia/rollup.json && wget https://raw.githubusercontent.com/base-org/node/main/sepolia/genesis-l2.json
50-
CMD ["/usr/bin/supervisord"]
51-
6+
apt-get install -y curl jq && \
7+
apt-get clean && \
8+
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)