From 4689fbb93309adcc478eb19995f2e963e8fd260b Mon Sep 17 00:00:00 2001 From: Odboy Date: Wed, 26 Feb 2025 19:58:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9Eansible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Other/ansible/Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ Other/ansible/build.sh | 1 + Other/ansible/pip.conf | 5 +++++ 3 files changed, 43 insertions(+) create mode 100644 Other/ansible/Dockerfile create mode 100644 Other/ansible/build.sh create mode 100644 Other/ansible/pip.conf diff --git a/Other/ansible/Dockerfile b/Other/ansible/Dockerfile new file mode 100644 index 0000000..30cedb1 --- /dev/null +++ b/Other/ansible/Dockerfile @@ -0,0 +1,37 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV PYTHON_HOME=/usr/local/python3 +ENV PATH="${PYTHON_HOME}/bin:$PATH" +WORKDIR /home/admin +ADD https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz ./ +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone; \ + sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/' /etc/yum.repos.d/*.repo; \ + yum install \ + libffi-devel \ + zlib-devel \ + bzip2-devel \ + openssl-devel \ + ncurses-devel \ + sqlite-devel \ + readline-devel \ + tk-devel \ + gdbm-devel \ + libpcap-devel \ + xz-devel \ + make \ + patch \ + gcc \ + tar \ + sysstat \ + net-tools -y; \ + tar -xvf Python-3.10.0.tgz; \ + cd Python-3.10.0; \ + ./configure --prefix=/usr/local/python3; \ + make && make install; \ + python3 -V; \ + mkdir ~/.pip; +COPY pip.conf ~/.pip/ +RUN yum install -y \ + epel-release \ + ansible; \ No newline at end of file diff --git a/Other/ansible/build.sh b/Other/ansible/build.sh new file mode 100644 index 0000000..5941515 --- /dev/null +++ b/Other/ansible/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-host-control:ansible . \ No newline at end of file diff --git a/Other/ansible/pip.conf b/Other/ansible/pip.conf new file mode 100644 index 0000000..4591cae --- /dev/null +++ b/Other/ansible/pip.conf @@ -0,0 +1,5 @@ +[global] +index-url = https://mirrors.aliyun.com/pypi/simple + +[install] +trusted-host = mirrors.aliyun.com \ No newline at end of file