From 3ba3301cc7a2fc8faa46a80b5040043add07e058 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Mon, 3 Nov 2025 01:58:32 +0000 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E6=9B=B4=E6=96=B0dockerfile?= =?UTF-8?q?=E6=9B=B4=E5=81=A5=E5=A3=AE=E7=9A=84=E5=A4=84=E7=90=86=E5=8C=85?= =?UTF-8?q?=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index dccc6ab..67e5a5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,24 @@ # syntax=docker/dockerfile:1 FROM alpine:latest -# 安装必要的工具 -RUN apk add --no-cache wget curl bash -RUN apk add --no-cache bind-tools -# --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main -RUN apk add --no-cache grep openssl ca-certificates uuidgen + +RUN apk update && apk add --no-cache wget curl bash || \ + (echo "Standard repo failed, trying edge repo..." && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main wget curl bash) + +RUN apk add --no-cache bind-tools || \ + (echo "Standard repo failed for bind-tools, trying edge repo..." && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main bind-tools) + +RUN apk add --no-cache grep openssl ca-certificates || \ + (echo "Standard repo failed, trying edge repo..." && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main grep openssl ca-certificates) + +RUN apk add --no-cache uuidgen || \ + apk add --no-cache util-linux || \ + (echo "Standard repo failed for uuidgen, trying edge repo..." && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main uuidgen) || \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main util-linux + RUN export noninteractive=true # 下载并执行 goecs.sh 脚本 RUN curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && \