This repository was archived by the owner on Nov 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +49
-17
lines changed
Expand file tree Collapse file tree 2 files changed +49
-17
lines changed Original file line number Diff line number Diff line change 11# Build stage
2- FROM golang:1.24 AS builder
2+ FROM golang:1.22 AS builder
33
44# Set necessary environment variables
55ENV CGO_ENABLED=1
66ENV GOOS=linux
77ENV GOARCH=amd64
8- ARG SONIC_VERSION=v2.0.6
98
109WORKDIR /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
3324RUN 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" ]
Original file line number Diff line number Diff line change 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"]
You can’t perform that action at this time.
0 commit comments