mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-12-24 12:37:53 +08:00
update
This commit is contained in:
3
.github/workflows/build_docker.yaml
vendored
3
.github/workflows/build_docker.yaml
vendored
@@ -29,6 +29,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/mips,linux/mipsle,linux/s390x,linux/riscv64
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/s390x,linux/riscv64
|
||||
# linux/mips,linux/mipsle 暂无alpine镜像
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/goecs:latest
|
||||
|
||||
23
Dockerfile
23
Dockerfile
@@ -1,24 +1,9 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# 为支持的平台使用 Alpine
|
||||
FROM --platform=$BUILDPLATFORM alpine:latest AS base-alpine
|
||||
FROM alpine:latest
|
||||
|
||||
# 为 MIPS 平台使用替代基础镜像
|
||||
FROM --platform=linux/mips debian:stable-slim AS base-mips
|
||||
FROM --platform=linux/mipsle debian:stable-slim AS base-mipsle
|
||||
|
||||
# 选择适当的基础镜像
|
||||
FROM base-$TARGETARCH$TARGETVARIANT AS final
|
||||
|
||||
# 安装必要的工具(需要根据基础镜像调整)
|
||||
RUN if [ -f /etc/alpine-release ]; then \
|
||||
apk add --no-cache wget curl bash; \
|
||||
else \
|
||||
apt-get update && apt-get install -y wget curl bash; \
|
||||
fi
|
||||
|
||||
# 设置 GitHub URL 环境变量
|
||||
ENV GITHUB_URL="https://github.com/oneclickvirt/ecs/releases/latest"
|
||||
# 安装必要的工具
|
||||
RUN apk add --no-cache wget curl bash
|
||||
|
||||
# 下载并执行 goecs.sh 脚本
|
||||
RUN curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && \
|
||||
@@ -27,4 +12,4 @@ RUN curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -
|
||||
bash goecs.sh install
|
||||
|
||||
# 设置 goecs 为入口点
|
||||
ENTRYPOINT ["goecs"]
|
||||
ENTRYPOINT ["goecs"]
|
||||
Reference in New Issue
Block a user