patch sonic (properly)

This commit is contained in:
Para Dox
2025-06-14 13:14:17 +07:00
parent 8986887888
commit 7bbc5eecb9
4 changed files with 15 additions and 2 deletions

View File

@@ -36,6 +36,8 @@ services:
args:
VERSION: v1.2.1-h
REPO: https://github.com/Fantom-foundation/sonic.git
COMMIT: ''
PATCH: ''
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -36,6 +36,8 @@ services:
args:
VERSION: v1.2.1-h
REPO: https://github.com/Fantom-foundation/sonic.git
COMMIT: ''
PATCH: ''
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -1,12 +1,19 @@
FROM golang:1.22 as builder
ARG VERSION
ARG COMMIT
ARG REPO
ARG PATCH
RUN apt-get update && apt-get install -y git musl-dev make
RUN cd /go && git clone ${REPO:-https://github.com/0xsoniclabs/sonic.git} sonic && cd sonic && git fetch --tags && git checkout -b ${VERSION} tags/${VERSION}
RUN cd /go && git clone ${REPO:-https://github.com/0xsoniclabs/sonic.git} sonic && cd sonic && git fetch --tags
RUN if [ -n "$COMMIT" ]; then \
git checkout -b ${VERSION} ${COMMIT}; \
else \
git checkout -b ${VERSION} tags/${VERSION}; \
fi
COPY ${PATCH:-empty.patch} /tmp/my-patch.patch

View File

@@ -34,8 +34,10 @@ services:
context: ./sonic
dockerfile: sonic.Dockerfile
args:
VERSION: 86647c65d5c7d4ba3b52abd81f20d977a91408f1
VERSION: v2.0.3
REPO: https://github.com/0xsoniclabs/sonic.git
COMMIT: 86647c65d5c7d4ba3b52abd81f20d977a91408f1
PATCH: sonic.patch
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle