mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-11 17:47:20 +10:00
release: Fix Docker build for loong64 and mipsle
This commit is contained in:
25
.github/workflows/docker.yml
vendored
25
.github/workflows/docker.yml
vendored
@@ -160,17 +160,17 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
include:
|
||||||
- linux/amd64
|
- { platform: "linux/amd64" }
|
||||||
- linux/arm/v6
|
- { platform: "linux/arm/v6" }
|
||||||
- linux/arm/v7
|
- { platform: "linux/arm/v7" }
|
||||||
- linux/arm64
|
- { platform: "linux/arm64" }
|
||||||
- linux/386
|
- { platform: "linux/386" }
|
||||||
- linux/mipsle
|
# mipsle: no base Docker image available for this platform
|
||||||
- linux/ppc64le
|
- { platform: "linux/ppc64le" }
|
||||||
- linux/riscv64
|
- { platform: "linux/riscv64" }
|
||||||
- linux/s390x
|
- { platform: "linux/s390x" }
|
||||||
- linux/loong64
|
- { platform: "linux/loong64", base_image: "ghcr.io/loong64/alpine:edge" }
|
||||||
steps:
|
steps:
|
||||||
- name: Get commit to build
|
- name: Get commit to build
|
||||||
id: ref
|
id: ref
|
||||||
@@ -223,6 +223,8 @@ jobs:
|
|||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile.binary
|
file: Dockerfile.binary
|
||||||
|
build-args: |
|
||||||
|
BASE_IMAGE=${{ matrix.base_image || 'alpine' }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||||
- name: Export digest
|
- name: Export digest
|
||||||
@@ -238,6 +240,7 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
merge:
|
merge:
|
||||||
|
if: github.event_name != 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build_docker
|
- build_docker
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
FROM alpine
|
ARG BASE_IMAGE=alpine
|
||||||
|
FROM ${BASE_IMAGE}
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG TARGETVARIANT
|
ARG TARGETVARIANT
|
||||||
LABEL maintainer="nekohasekai <contact-git@sekai.icu>"
|
LABEL maintainer="nekohasekai <contact-git@sekai.icu>"
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --no-cache --upgrade bash tzdata ca-certificates nftables
|
&& if command -v apk > /dev/null; then \
|
||||||
|
apk add --no-cache --upgrade bash tzdata ca-certificates nftables; \
|
||||||
|
else \
|
||||||
|
apt-get update && apt-get install -y --no-install-recommends bash tzdata ca-certificates nftables \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*; \
|
||||||
|
fi
|
||||||
COPY sing-box-${TARGETARCH}${TARGETVARIANT} /usr/local/bin/sing-box
|
COPY sing-box-${TARGETARCH}${TARGETVARIANT} /usr/local/bin/sing-box
|
||||||
ENTRYPOINT ["sing-box"]
|
ENTRYPOINT ["sing-box"]
|
||||||
|
|||||||
Reference in New Issue
Block a user