Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 26ee5c4

Browse files
authored
Merge pull request #6 from chainstack/feature/up-to-date-fantom-sonic-client
chore: upgrade 1.2.1-i - sonic client for fantom mainnet node
2 parents cb5cbfc + cdbbfa7 commit 26ee5c4

File tree

2 files changed

+49
-17
lines changed

2 files changed

+49
-17
lines changed

Dockerfile

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
# Build stage
2-
FROM golang:1.24 AS builder
2+
FROM golang:1.22 AS builder
33

44
# Set necessary environment variables
55
ENV CGO_ENABLED=1
66
ENV GOOS=linux
77
ENV GOARCH=amd64
8-
ARG SONIC_VERSION=v2.0.6
98

109
WORKDIR /tmp
1110

12-
RUN set -eux; \
13-
apt-get update && \
14-
apt-get install -y \
15-
ca-certificates \
16-
curl \
17-
wget \
18-
git \
19-
build-essential \
20-
&& rm -rf /var/lib/apt/lists/*
11+
RUN apt-get update && apt-get install -y --no-install-recommends make gcc g++ musl-dev git && rm -rf /var/lib/apt/lists/*
2112

22-
RUN git clone --depth 1 --branch ${SONIC_VERSION} https://github.com/0xsoniclabs/sonic.git && \
23-
cd sonic && \
24-
make
13+
RUN git clone --depth 1 --branch v1.2.1-i https://github.com/Fantom-foundation/Sonic.git && \
14+
cd Sonic && \
15+
make all
2516

2617
# Final stage
2718

@@ -33,9 +24,9 @@ WORKDIR /root/.sonic
3324
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl jq && rm -rf /var/lib/apt/lists/*
3425

3526
# Copy binaries from builder stage
36-
COPY --from=builder /tmp/sonic/build/ /usr/local/bin
27+
COPY --from=builder /tmp/Sonic/build/ /usr/local/bin
3728

3829
# Expose Sonic's default ports (change if necessary)
39-
EXPOSE 18545/tcp 18546/tcp 5050/tcp 5050/udp
30+
EXPOSE 18545 18546
4031

41-
ENTRYPOINT ["sonicd"]
32+
ENTRYPOINT ["sonicd"]

Dockerfile.v2Sonic

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Build stage
2+
FROM golang:1.24 AS builder
3+
4+
# Set necessary environment variables
5+
ENV CGO_ENABLED=1
6+
ENV GOOS=linux
7+
ENV GOARCH=amd64
8+
ARG SONIC_VERSION=v2.0.6
9+
10+
WORKDIR /tmp
11+
12+
RUN set -eux; \
13+
apt-get update && \
14+
apt-get install -y \
15+
ca-certificates \
16+
curl \
17+
wget \
18+
git \
19+
build-essential \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
RUN git clone --depth 1 --branch ${SONIC_VERSION} https://github.com/0xsoniclabs/sonic.git && \
23+
cd sonic && \
24+
make
25+
26+
# Final stage
27+
28+
FROM ubuntu:22.04
29+
30+
WORKDIR /root/.sonic
31+
32+
# Install runtime dependencies, including glibc
33+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl jq && rm -rf /var/lib/apt/lists/*
34+
35+
# Copy binaries from builder stage
36+
COPY --from=builder /tmp/sonic/build/ /usr/local/bin
37+
38+
# Expose Sonic's default ports (change if necessary)
39+
EXPOSE 18545/tcp 18546/tcp 5050/tcp 5050/udp
40+
41+
ENTRYPOINT ["sonicd"]

0 commit comments

Comments
 (0)