refactor: 目录重组,runtime-python3→runtime-python310、tools-ansible→app/ansible、dotnet6 示例→demo/dotnet6,并同步 README
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# 由 build.sh 预下载的 Python 源码包经 ADD 解压进镜像,
|
||||
# ADD 的源文件必须在构建上下文内,因此 *.tgz 不能在这里忽略
|
||||
build.sh
|
||||
.git/
|
||||
.DS_Store
|
||||
@@ -1,3 +0,0 @@
|
||||
# 构建产物 / 本地缓存
|
||||
*.tgz
|
||||
.DS_Store
|
||||
@@ -1,37 +0,0 @@
|
||||
FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:system-alinux3
|
||||
LABEL MAINTAINER="tianjun@odboy.cn"
|
||||
ENV TimeZone=Asia/Shanghai
|
||||
ENV PYTHON_HOME=/usr/local/python3
|
||||
ENV PATH="${PYTHON_HOME}/bin:$PATH"
|
||||
WORKDIR /home/admin
|
||||
# https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
|
||||
# 由 build.sh 预先下载到本目录
|
||||
ADD Python-3.10.0.tgz ./
|
||||
RUN set -e && 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 set -e && yum install -y \
|
||||
epel-release \
|
||||
ansible;
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# 先下载 Python 源码包到当前目录,再基于本地文件构建镜像
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
PYTHON=Python-3.10.0.tgz
|
||||
URL=https://www.python.org/ftp/python/3.10.0/${PYTHON}
|
||||
|
||||
if [ ! -f "${PYTHON}" ]; then
|
||||
curl -fL -o "${PYTHON}" "${URL}"
|
||||
fi
|
||||
|
||||
IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:tools-ansible
|
||||
docker build -t "${IMAGE}" .
|
||||
docker push "${IMAGE}"
|
||||
@@ -1,5 +0,0 @@
|
||||
[global]
|
||||
index-url = https://mirrors.aliyun.com/pypi/simple
|
||||
|
||||
[install]
|
||||
trusted-host = mirrors.aliyun.com
|
||||
Reference in New Issue
Block a user