Dockerhua / Dockerfile
zhuhai111's picture
Upload 2 files
7e134a7 verified
raw
history blame contribute delete
839 Bytes
# 基于 nkpro/chrome-novnc:latest 镜像
FROM nkpro/chrome-novnc:latest
# 切换到 root 用户以安装软件包
USER root
# 更新包列表并安装 openssh-client, sshpass, 和 autossh
# --no-install-recommends 减少镜像大小
# 清理 apt 缓存
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-client \
sshpass \
autossh \
&& rm -rf /var/lib/apt/lists/*
# 将包装脚本复制到镜像中
COPY entrypoint_wrapper.sh /entrypoint_wrapper.sh
# 使包装脚本可执行
RUN chmod +x /entrypoint_wrapper.sh
# 将包装脚本设置为新的入口点
# 基础镜像的 CMD 将作为参数传递给此脚本
ENTRYPOINT ["/entrypoint_wrapper.sh"]
# (可选) 如果基础镜像最后切换回非 root 用户,可以在这里切换回去
# 例如: USER 1000
USER 1000