Block a user
clash-cdn-optimizer-cli (sha-257460948f87)
Published 2026-07-27 00:44:37 +08:00 by Strom
Installation
docker pull gitea.strodio.com/strom/clash-cdn-optimizer-cli:sha-257460948f87sha256:d413bf48b73b059858c1d63b651752ae968e009d016bc979f21d7db0b7b74364
Image Layers
| ADD alpine-minirootfs-3.24.1-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENV LANG=C.UTF-8 |
| RUN /bin/sh -c set -eux; apk add --no-cache ca-certificates tzdata ; # buildkit |
| ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D |
| ENV PYTHON_VERSION=3.11.15 |
| ENV PYTHON_SHA256=272179ddd9a2e41a0fc8e42e33dfbdca0b3711aa5abf372d3f2d51543d09b625 |
| RUN /bin/sh -c set -eux; apk add --no-cache --virtual .build-deps bluez-dev bzip2-dev dpkg-dev dpkg findutils gcc gdbm-dev gnupg libc-dev libffi-dev libnsl-dev libtirpc-dev linux-headers make ncurses-dev openssl-dev pax-utils readline-dev sqlite-dev tar tcl-dev tk tk-dev util-linux-dev xz xz-dev zlib-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' | xargs -rt apk add --no-network --virtual .python-rundeps ; apk del --no-network .build-deps; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==79.0.1' 'wheel==0.46.3' ; pip3 --version # buildkit |
| RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit |
| CMD ["python3"] |
| LABEL maintainer=Clash CDN Optimizer |
| LABEL description=Clash 配置 CDN 节点优选工具 |
| WORKDIR /app |
| /bin/sh -c apk add --no-cache bash ca-certificates dcron tzdata |
| ENV TZ=Asia/Shanghai |
| /bin/sh -c pip install --no-cache-dir pyyaml requests |
| COPY file:1b722c7042fc846f66839c9e05b8a6c29b0a86e283249fd48e50aeda50a4688d in /usr/local/bin/clash-speedtest |
| /bin/sh -c chmod +x /usr/local/bin/clash-speedtest |
| COPY dir:c0a7d377afdf0fdf18b8c64e6104c1c5e23f28dbf96b1e80c78405d0bdda0ea8 in /app/src/ |
| COPY dir:a228a332b80413bbff65b958a4262d38bcc6a1f768312060cc899b9d259a299d in /app/scripts/ |
| COPY file:1fff9b73af4327f4d6b91a32f8b68669ac6227fb6bb3a365407dd815d3dbdd4f in /app/config/ |
| COPY file:0fd6926cd8aabac0940e44d7e50617055ffe0033518ea29d6144af8fef1759d7 in /app/config/ |
| COPY file:4ca8731b0ec1becc8fbf2701aee7ab4ad6badda9eaedb33af21abd17b676434f in /app/input/ |
| /bin/sh -c mkdir -p /app/input /app/output /app/bin |
| /bin/sh -c ln -s /usr/local/bin/clash-speedtest /app/bin/clash-speedtest |
| /bin/sh -c chmod +x /app/src/*.py /app/scripts/*.sh |
| /bin/sh -c printf '#!/bin/bash\ncd /app\n./scripts/run.sh >> /var/log/clash-cdn-optimizer.log 2>&1\n' > /app/cron-run.sh && chmod +x /app/cron-run.sh |
| /bin/sh -c echo "0 3 * * * /app/cron-run.sh" > /etc/crontabs/root |
| COPY file:1747d8fb4de4ede817b402e79b5165b4ff015703ccf89f76f883dcd3b1a171a1 in /app/entrypoint.sh |
| /bin/sh -c chmod +x /app/entrypoint.sh |
| ENTRYPOINT ["/app/entrypoint.sh"] |
| LABEL org.opencontainers.image.revision=257460948f8716a38d0847cf04444b0a8eb02e67 |
| LABEL org.opencontainers.image.source=http://192.168.101.200:3000/Strom/clash-cdn-optimizer |
Labels
| Key | Value |
|---|---|
| description | Clash 配置 CDN 节点优选工具 |
| maintainer | Clash CDN Optimizer |
| org.opencontainers.image.revision | 257460948f8716a38d0847cf04444b0a8eb02e67 |
| org.opencontainers.image.source | http://192.168.101.200:3000/Strom/clash-cdn-optimizer |
Details
Versions (3)
View all