Ubuntu System Information / show-system-info (push) Successful in 39s
🐛 修复`Dockerfile`缺少系统包
50 lines
1.3 KiB
Docker
50 lines
1.3 KiB
Docker
FROM ubuntu:22.04
|
|
|
|
# 设置环境变量避免交互式安装
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# 更新系统并安装必要软件
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
git \
|
|
python3 \
|
|
python3-yaml \
|
|
supervisor \
|
|
ca-certificates \
|
|
gnupg \
|
|
lsb-release \
|
|
qemu-user-static \
|
|
binfmt-support \
|
|
apt-transport-https \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 安装 Docker(包含 Buildx 插件)
|
|
RUN install -m 0755 -d /etc/apt/keyrings && \
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
|
chmod a+r /etc/apt/keyrings/docker.gpg && \
|
|
echo \
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
|
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list && \
|
|
apt-get update && \
|
|
apt-get install -y \
|
|
docker-ce \
|
|
docker-ce-cli \
|
|
containerd.io \
|
|
docker-buildx-plugin \
|
|
docker-compose-plugin \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 验证安装
|
|
RUN docker --version && \
|
|
qemu-aarch64-static --version && \
|
|
qemu-x86_64-static --version
|
|
|
|
# 创建必要目录
|
|
RUN mkdir -p /data /etc/supervisor/conf.d /var/log/supervisor
|
|
|
|
# 设置工作目录
|
|
WORKDIR /data
|
|
|
|
# 使用自定义入口点
|
|
ENTRYPOINT ["/data/entrypoint.sh"]
|