首次提交,用于实现安装VNCServer
This commit is contained in:
21
dockerfile/Dockerfile
Normal file
21
dockerfile/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# 使用 Alpine Linux 最新版
|
||||
FROM alpine:3.22.1
|
||||
|
||||
# 安装基础依赖(Alpine 使用 apk)
|
||||
RUN apk add --no-cache python3 py3-pip openssh-client less
|
||||
|
||||
# 创建虚拟环境
|
||||
RUN python3 -m venv /opt/venv
|
||||
|
||||
# 激活虚拟环境
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# 安装 Ansible 和其他 Python 包
|
||||
RUN pip3 install --no-cache-dir ansible-core==2.19.0 pywinrm && ansible-galaxy collection install ansible.windows
|
||||
|
||||
# 创建工作目录
|
||||
RUN mkdir -p /data/ansible
|
||||
WORKDIR /data/ansible
|
||||
|
||||
# 默认启动命令(保持容器运行)
|
||||
CMD ["tail", "-f", "/dev/null"]
|
||||
7
dockerfile/Dockerfile.rockylinux:10.0-minimal
Normal file
7
dockerfile/Dockerfile.rockylinux:10.0-minimal
Normal file
@@ -0,0 +1,7 @@
|
||||
# 使用 RockyLinux 10.0 最小化镜像
|
||||
FROM rockylinux/rockylinux:10.0-minimal
|
||||
RUN microdnf install -y python3 python3-pip openssh-clients less && pip3 install --no-cache-dir ansible-core==2.19.0 pywinrm && ansible-galaxy collection install ansible.windows && microdnf clean all
|
||||
RUN mkdir -p /data/ansible
|
||||
WORKDIR /data/ansible
|
||||
# 默认启动命令(保持容器运行)
|
||||
CMD ["tail", "-f", "/dev/null"]
|
||||
Reference in New Issue
Block a user