fix: enable full version alpine build only

This commit is contained in:
Mike Evans 2023-06-22 17:42:59 +01:00 committed by GitHub
parent 2971d33915
commit 79835f6414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 21 deletions

View file

@ -12,8 +12,8 @@ jobs:
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
buildType: [standard, minimized, full] buildType: [full]
distro: [alpine, distroless] distro: [alpine]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Source Code of 'SagerNet/sing-box' - name: Checkout Source Code of 'SagerNet/sing-box'

View file

@ -12,8 +12,8 @@ jobs:
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
buildType: [standard, minimized, full] buildType: [full]
distro: [alpine, distroless] distro: [alpine]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Source Code of 'SagerNet/sing-box' - name: Checkout Source Code of 'SagerNet/sing-box'
@ -70,10 +70,10 @@ jobs:
- name: Get tag to build - name: Get tag to build
id: tag id: tag
run: | run: |
if [[ "${{ matrix.distro }}" == "alpine" && "${{ matrix.buildType }}" == "standard" ]]; then if [[ "${{ matrix.distro }}" == "alpine" && "${{ matrix.buildType }}" == "full" ]]; then
echo "latest=etnperlong/sing-box:latest" >> $GITHUB_OUTPUT echo "latest=etnperlong/sing-box:latest" >> $GITHUB_OUTPUT
fi fi
if [[ "${{ matrix.distro }}" == "distroless" && "${{ matrix.buildType }}" == "standard" ]]; then if [[ "${{ matrix.distro }}" == "distroless" && "${{ matrix.buildType }}" == "full" ]]; then
echo "latest=etnperlong/sing-box:distroless" >> $GITHUB_OUTPUT echo "latest=etnperlong/sing-box:distroless" >> $GITHUB_OUTPUT
fi fi
if [[ -z "${{ github.event.inputs.tag }}" ]]; then if [[ -z "${{ github.event.inputs.tag }}" ]]; then

View file

@ -4,9 +4,9 @@
[sing-box](https://sing-box.sagernet.org/) is a universal proxy platform for building your own proxy. [sing-box](https://sing-box.sagernet.org/) is a universal proxy platform for building your own proxy.
Docker images are built for quick deployment in various computing cloud providers. Docker images are designed for rapid deployment to various computing cloud providers.
For more information on docker and containerization technologies, refer to [official document](https://docs.docker.com/). For more information on Docker and containerization technologies, read the [official document](https://docs.docker.com/).
## Documentation ## Documentation
@ -22,15 +22,9 @@ For more information on docker and containerization technologies, refer to [offi
## Enabled features ## Enabled features
- `standard` **Full version!**
> `with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme`
- `full`
> `with_gvisor,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_reality_server,with_clash_api,with_v2ray_api,with_acme` > `with_gvisor,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_reality_server,with_clash_api,with_v2ray_api,with_acme`
- `mini`
> `with_quic,with_utls,with_reality_server`
## Supported tags ## Supported tags
- `latest` *([latest release](https://github.com/SagerNet/sing-box/releases))* - `latest` *([latest release](https://github.com/SagerNet/sing-box/releases))*
@ -38,8 +32,4 @@ For more information on docker and containerization technologies, refer to [offi
- `dev` *([dev branch](https://github.com/SagerNet/sing-box/tree/dev))* - `dev` *([dev branch](https://github.com/SagerNet/sing-box/tree/dev))*
- `dev-next` *([dev-next branch](https://github.com/SagerNet/sing-box/tree/dev))* - `dev-next` *([dev-next branch](https://github.com/SagerNet/sing-box/tree/dev))*
## Additional distro For example, `etnperlong/sing-box:dev-next` means a fully functional docker image.
Add `-distroless` to the end of the tag to use the build of distroless images.
For example, `etnperlong/sing-box:dev-next-full-distroless` is the distroless build of full feature enabled image.

View file

@ -9,7 +9,7 @@ RUN set -ex \
&& apk add git build-base \ && apk add git build-base \
&& export COMMIT=$(git rev-parse --short HEAD) \ && export COMMIT=$(git rev-parse --short HEAD) \
&& export VERSION=$(go run ./cmd/internal/read_tag) \ && export VERSION=$(go run ./cmd/internal/read_tag) \
&& go build -v -trimpath -tags with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme \ && go build -v -trimpath -tags with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme \
-o /go/bin/sing-box \ -o /go/bin/sing-box \
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \ -ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \
./cmd/sing-box ./cmd/sing-box