Skip to content

Commit

Permalink
arm arch image for caddy isnt correct
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwen committed Oct 30, 2024
1 parent 2607412 commit e669088
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/caddy-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -44,12 +44,14 @@ jobs:
echo "CADDY_VERSION=${CADDY_VERSION#v}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./caddy
file: ./caddy/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
provenance: false
outputs: type=registry,push=true
tags: |
ghcr.io/${{ github.repository_owner }}/caddy:latest
ghcr.io/${{ github.repository_owner }}/caddy:2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/singbox-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -46,7 +46,7 @@ jobs:
echo "SINGBOX_VERSION=${SINGBOX_VERSION#v}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./singbox
file: ./singbox/Dockerfile
Expand Down
7 changes: 5 additions & 2 deletions singbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ RUN go build -v -trimpath -tags \
# Build tcp-brutal
WORKDIR /tcp-brutal
RUN curl -L https://github.com/apernet/tcp-brutal/archive/refs/heads/master.tar.gz | tar xz --strip-components=1
RUN sed -i 's/$(shell uname -r)/$(shell ls -1 /lib/modules | tail -n 1)/' Makefile
RUN make KERNELDIR=/lib/modules/$(ls -1 /lib/modules | tail -n 1)/build
# Modify Makefile to ensure TCP congestion control support
RUN sed -i 's/ccflags-y := -std=gnu99/ccflags-y := -std=gnu99 -DCONFIG_TCP_CONG_BBR -DCONFIG_TCP_CONG_CUBIC -DCONFIG_IPV6=y/' Makefile && \
KERNELDIR=/usr/src/linux-headers-$(ls -1 /lib/modules | tail -n 1) \
KCFLAGS="-DCONFIG_TCP_CONG_BBR -DCONFIG_TCP_CONG_CUBIC -DCONFIG_IPV6=y" make

# Final stage
FROM debian:bookworm-slim
Expand All @@ -44,6 +46,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
nftables \
kmod \
linux-modules-extra-$(uname -r) \
&& rm -rf /var/lib/apt/lists/*

# Copy the sing-box binary from the builder stage
Expand Down

0 comments on commit e669088

Please sign in to comment.