From 09ca4808424c11f1e98ee710b28ed91a0d8e9242 Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 16 Jul 2026 14:51:21 +0800 Subject: [PATCH] =?UTF-8?q?chore(docker):=20=E7=A7=BB=E9=99=A4=20gh-proxy,?= =?UTF-8?q?=E6=94=B9=E7=94=A8=20GitHub=20=E7=9B=B4=E8=BF=9E=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=20dx=20=E4=B8=8E=20Tailwind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dioxus CLI 与 Tailwind CSS 独立二进制此前经 gh-proxy.com 镜像下载, 现移除 GH_PROXY 前缀及相关注释,直接从 GitHub Releases 拉取。 --- Dockerfile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20532af..7507114 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,6 @@ FROM rust:1.96-bookworm AS builder # - Debian apt -> TUNA (Tsinghua) # - Rust + crates.io -> rsproxy (ByteDance) # - Node.js + npm/pnpm -> npmmirror (Alibaba) -# - Tailwind standalone -> gh-proxy.com (China GitHub-release CDN) ARG DEBIAN_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/debian ARG DEBIAN_SECURITY_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/debian-security ARG NODE_MIRROR=https://registry.npmmirror.com/-/binary/node @@ -77,12 +76,6 @@ RUN mkdir -p /usr/local/cargo \ RUN rustup target add wasm32-unknown-unknown \ x86_64-unknown-linux-musl aarch64-unknown-linux-musl -# China GitHub-release CDN: GitHub's release CDN is slow/unreliable from inside -# the container, and the host proxy (host.docker.internal:10808) throttles large -# files to ~16 KB/s. gh-proxy.com served release assets at ~430 KB/s in testing. -# Set empty to fall back to the direct GitHub URL. Shared by dx + Tailwind below. -ARG GH_PROXY=https://gh-proxy.com - # Install the Dioxus CLI from the official prebuilt binary (GitHub Releases), # NOT `cargo install` (which compiles dx-cli's huge dep tree from source — the # slowest single Docker step). The release tag v0.7.9 matches the crate version @@ -101,14 +94,14 @@ RUN ARCH="$(dpkg --print-architecture)" \ *) echo "unsupported arch: $ARCH" >&2; exit 1 ;; \ esac \ && DX_URL="https://github.com/DioxusLabs/dioxus/releases/download/v${DX_VERSION}/dx-${DX_TRIPLET}.tar.gz" \ - && curl -fsSL "${GH_PROXY:+${GH_PROXY}/}${DX_URL}" -o /tmp/dx.tar.gz \ + && curl -fsSL "${DX_URL}" -o /tmp/dx.tar.gz \ && echo "${DX_SHA256} /tmp/dx.tar.gz" | sha256sum -c - \ && tar -xzf /tmp/dx.tar.gz -C /usr/local/bin \ && rm /tmp/dx.tar.gz \ && dx --version # --- Tailwind CSS v4: the standalone binary is distributed via GitHub -# Releases (~106 MB); routed through the same GH_PROXY as dx above. --- +# Releases (~106 MB). --- ARG TAILWIND_VERSION=4.3.1 RUN ARCH="$(dpkg --print-architecture)" \ && case "$ARCH" in \ @@ -117,7 +110,7 @@ RUN ARCH="$(dpkg --print-architecture)" \ *) echo "unsupported arch: $ARCH" >&2; exit 1 ;; \ esac \ && GH_URL="https://github.com/tailwindlabs/tailwindcss/releases/download/v${TAILWIND_VERSION}/tailwindcss-linux-${TW_ARCH}" \ - && curl -fsSL -o /usr/local/bin/tailwindcss "${GH_PROXY:+${GH_PROXY}/}${GH_URL}" \ + && curl -fsSL -o /usr/local/bin/tailwindcss "${GH_URL}" \ && chmod +x /usr/local/bin/tailwindcss WORKDIR /build