Compare commits
5 Commits
1601d474f8
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
f978e0a26b
|
|||
|
7b1b154e95
|
|||
|
1f6c90db8c
|
|||
|
a6e55ed3e1
|
|||
|
7ab281bea7
|
@@ -37,6 +37,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
LIBRESSL_VERSION=4.2.1
|
LIBRESSL_VERSION=4.2.1
|
||||||
NGINX_VERSION=1.30.0
|
NGINX_VERSION=1.30.0
|
||||||
|
NJS_VERSION=0.9.8
|
||||||
NGINX_BRANCH=vanilla
|
NGINX_BRANCH=vanilla
|
||||||
-
|
-
|
||||||
name: Build and push nginx custom images
|
name: Build and push nginx custom images
|
||||||
@@ -59,4 +60,5 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
LIBRESSL_VERSION=4.2.1
|
LIBRESSL_VERSION=4.2.1
|
||||||
NGINX_VERSION=1.30.0
|
NGINX_VERSION=1.30.0
|
||||||
|
NJS_VERSION=0.9.8
|
||||||
NGINX_BRANCH=woggioni
|
NGINX_BRANCH=woggioni
|
||||||
|
|||||||
@@ -29,6 +29,5 @@ jobs:
|
|||||||
pull: false
|
pull: false
|
||||||
ssh: default=/home/luser/.ssh/id_ed25519
|
ssh: default=/home/luser/.ssh/id_ed25519
|
||||||
tags: |
|
tags: |
|
||||||
"gitea.woggioni.net/woggioni/sserver-rust:latest"
|
"gitea.woggioni.net/woggioni/sserver-rust:dev"
|
||||||
"gitea.woggioni.net/woggioni/sserver-rust:v1.24.0"
|
|
||||||
build-args: "VERSION=1.24.0"
|
build-args: "VERSION=1.24.0"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ RUN rm repository.key
|
|||||||
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
|
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
|
||||||
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
|
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
|
||||||
curl \
|
curl \
|
||||||
|
openssh \
|
||||||
aarch64-unknown-linux-musl-gcc x86_64-unknown-linux-musl-gcc \
|
aarch64-unknown-linux-musl-gcc x86_64-unknown-linux-musl-gcc \
|
||||||
arm-unknown-linux-musleabihf-gcc \
|
arm-unknown-linux-musleabihf-gcc \
|
||||||
arm-unknown-linux-musleabi-gcc \
|
arm-unknown-linux-musleabi-gcc \
|
||||||
@@ -70,7 +71,6 @@ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
|
|||||||
imagemagick \
|
imagemagick \
|
||||||
python-sphinx \
|
python-sphinx \
|
||||||
python-yaml \
|
python-yaml \
|
||||||
openssh \
|
|
||||||
rust \
|
rust \
|
||||||
rust-src \
|
rust-src \
|
||||||
rust-bindgen \
|
rust-bindgen \
|
||||||
|
|||||||
+3
-4
@@ -2,7 +2,7 @@ ARG NGINX_BRANCH=vanilla
|
|||||||
FROM alpine:3.23 AS base
|
FROM alpine:3.23 AS base
|
||||||
|
|
||||||
FROM base AS build_stage_1
|
FROM base AS build_stage_1
|
||||||
ARG NGINX_VERSION LIBRESSL_VERSION
|
ARG NGINX_VERSION LIBRESSL_VERSION NJS_VERSION
|
||||||
RUN --mount=type=cache,target=/var/cache/apk apk update
|
RUN --mount=type=cache,target=/var/cache/apk apk update
|
||||||
RUN --mount=type=cache,target=/var/cache/apk apk add \
|
RUN --mount=type=cache,target=/var/cache/apk apk add \
|
||||||
autoconf \
|
autoconf \
|
||||||
@@ -34,8 +34,7 @@ RUN --mount=type=cache,target=/var/cache/apk apk add \
|
|||||||
tar \
|
tar \
|
||||||
tzdata \
|
tzdata \
|
||||||
zlib \
|
zlib \
|
||||||
zlib-dev \
|
zlib-dev
|
||||||
mercurial
|
|
||||||
RUN adduser -D luser
|
RUN adduser -D luser
|
||||||
USER luser
|
USER luser
|
||||||
WORKDIR /home/luser
|
WORKDIR /home/luser
|
||||||
@@ -69,7 +68,7 @@ ADD --chown=luser:luser https://github.com/google/ngx_brotli.git /ngx_brotli
|
|||||||
|
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
RUN hg clone http://hg.nginx.org/njs /njs
|
ADD --chown=luser:luser git@github.com:nginx/njs.git#${NJS_VERSION} /njs
|
||||||
RUN chown luser:luser -R /njs
|
RUN chown luser:luser -R /njs
|
||||||
USER luser
|
USER luser
|
||||||
WORKDIR /home/luser
|
WORKDIR /home/luser
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ FROM busybox:musl AS sslocal
|
|||||||
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/sslocal /usr/bin/
|
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/sslocal /usr/bin/
|
||||||
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
|
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
|
||||||
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
|
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
|
||||||
COPY --from=builder --chown=root:root /tmp/v2ray-plugin /usr/bin/v2ray-plugin
|
COPY --from=builder --chown=root:root --chmod=755 /tmp/v2ray-plugin /usr/bin/v2ray-plugin
|
||||||
COPY --from=builder --chown=root:root /tmp/xray-plugin /usr/bin/xray-plugin
|
COPY --from=builder --chown=root:root --chmod=755 /tmp/xray-plugin /usr/bin/xray-plugin
|
||||||
|
|
||||||
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
||||||
CMD [ "sslocal", "--log-without-time", "-c", "/etc/shadowsocks-rust/config.json" ]
|
CMD [ "sslocal", "--log-without-time", "-c", "/etc/shadowsocks-rust/config.json" ]
|
||||||
@@ -50,8 +50,8 @@ FROM busybox:musl AS ssserver
|
|||||||
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/ssserver /usr/bin/
|
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/ssserver /usr/bin/
|
||||||
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
|
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
|
||||||
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
|
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
|
||||||
COPY --from=builder /tmp/v2ray-plugin /usr/bin/v2ray-plugin
|
COPY --from=builder --chown=root:root --chmod=755 /tmp/v2ray-plugin /usr/bin/v2ray-plugin
|
||||||
COPY --from=builder /tmp/xray-plugin /usr/bin/xray-plugin
|
COPY --from=builder --chown=root:root --chmod=755 /tmp/xray-plugin /usr/bin/xray-plugin
|
||||||
|
|
||||||
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
set -e
|
||||||
TARGETPLATFORM=$1
|
TARGETPLATFORM=$1
|
||||||
PLUGIN_VERSION=1.8.24
|
PLUGIN_VERSION=1.260327.0
|
||||||
mkdir /tmp/xray_plugin.d
|
mkdir /tmp/xray_plugin.d
|
||||||
cd /tmp/xray_plugin.d
|
cd /tmp/xray_plugin.d
|
||||||
case "$TARGETPLATFORM" in
|
case "$TARGETPLATFORM" in
|
||||||
"linux/386")
|
"linux/386")
|
||||||
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-386-linux/1.8.24/xray-plugin-linux-386-v1.8.24.tar.gz"
|
url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-i386"
|
||||||
;;
|
;;
|
||||||
"linux/amd64")
|
"linux/amd64")
|
||||||
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-amd64-linux/1.8.24/xray-plugin-linux-amd64-v1.8.24.tar.gz"
|
url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-x86_64"
|
||||||
;;
|
;;
|
||||||
"linux/arm64")
|
"linux/arm64")
|
||||||
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-arm64-linux/1.8.24/xray-plugin-linux-arm64-v1.8.24.tar.gz"
|
url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-aarch64"
|
||||||
;;
|
;;
|
||||||
"linux/arm/v7")
|
"linux/arm/v7")
|
||||||
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-arm-linux/1.8.24/xray-plugin-linux-arm-v1.8.24.tar.gz"
|
url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-armv7h"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Doesn't support $TARGETPLATFORM architecture"
|
echo "Doesn't support $TARGETPLATFORM architecture"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
curl --retry 3 "$url" | tar -xvz
|
curl --fail -L --retry 3 "$url" -o /tmp/xray-plugin
|
||||||
mv xray-plugin* /tmp/xray-plugin
|
|
||||||
|
|||||||
Reference in New Issue
Block a user