mirror of
http://bgp.hk.skcks.cn:10088/github.com/oneclickvirt/ecs
synced 2026-04-20 12:50:58 +08:00
fix: 更新dockerfile更健壮的处理包安装
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -1,10 +1,24 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
# 安装必要的工具
|
|
||||||
RUN apk add --no-cache wget curl bash
|
RUN apk update && apk add --no-cache wget curl bash || \
|
||||||
RUN apk add --no-cache bind-tools
|
(echo "Standard repo failed, trying edge repo..." && \
|
||||||
# --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main wget curl bash)
|
||||||
RUN apk add --no-cache grep openssl ca-certificates uuidgen
|
|
||||||
|
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
|
RUN export noninteractive=true
|
||||||
# 下载并执行 goecs.sh 脚本
|
# 下载并执行 goecs.sh 脚本
|
||||||
RUN curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && \
|
RUN curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && \
|
||||||
|
|||||||
Reference in New Issue
Block a user