diff --git a/CompileEnv/DotNet6/Dockerfile b/CompileEnv/DotNet6/Dockerfile new file mode 100644 index 0000000..6412065 --- /dev/null +++ b/CompileEnv/DotNet6/Dockerfile @@ -0,0 +1,31 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV DOTNET_HOME=/usr/local/dotnet +ENV PATH="${DOTNET_HOME}:$PATH" +WORKDIR /home/admin +# https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.427-linux-x64-binaries +ADD https://download.visualstudio.microsoft.com/download/pr/12ee34e8-640c-400e-a6dc-4892b442df92/81d40fc98a5bbbfbafa4cc1ab86d6288/dotnet-sdk-6.0.427-linux-x64.tar.gz ./ +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; \ + mkdir /usr/local/dotnet; \ + tar -xzvf dotnet-sdk-6.0.427-linux-x64.tar.gz -C /usr/local/dotnet; \ + dotnet --info; diff --git a/CompileEnv/DotNet6/build.sh b/CompileEnv/DotNet6/build.sh new file mode 100644 index 0000000..6ab7bb6 --- /dev/null +++ b/CompileEnv/DotNet6/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-compile:dotnet6 . \ No newline at end of file diff --git a/CompileEnv/DotNet8/Dockerfile b/CompileEnv/DotNet8/Dockerfile new file mode 100644 index 0000000..b90d516 --- /dev/null +++ b/CompileEnv/DotNet8/Dockerfile @@ -0,0 +1,31 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV DOTNET_HOME=/usr/local/dotnet +ENV PATH="${DOTNET_HOME}:$PATH" +WORKDIR /home/admin +# https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.403-linux-x64-binaries +ADD https://download.visualstudio.microsoft.com/download/pr/ca6cd525-677e-4d3a-b66c-11348a6f920a/ec395f498f89d0ca4d67d903892af82d/dotnet-sdk-8.0.403-linux-x64.tar.gz ./ +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; \ + mkdir /usr/local/dotnet; \ + tar -xzvf dotnet-sdk-8.0.403-linux-x64.tar.gz -C /usr/local/dotnet; \ + dotnet --info; diff --git a/CompileEnv/DotNet8/build.sh b/CompileEnv/DotNet8/build.sh new file mode 100644 index 0000000..2c689b6 --- /dev/null +++ b/CompileEnv/DotNet8/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-compile:dotnet8 . \ No newline at end of file diff --git a/CompileEnv/DotNet9/Dockerfile b/CompileEnv/DotNet9/Dockerfile new file mode 100644 index 0000000..c817afb --- /dev/null +++ b/CompileEnv/DotNet9/Dockerfile @@ -0,0 +1,31 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV DOTNET_HOME=/usr/local/dotnet +ENV PATH="${DOTNET_HOME}:$PATH" +WORKDIR /home/admin +# https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-9.0.100-rc.2-linux-x64-binaries +ADD https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.100-rc.2.24474.11/dotnet-sdk-9.0.100-rc.2.24474.11-linux-x64.tar.gz ./ +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; \ + mkdir /usr/local/dotnet; \ + tar -xzvf dotnet-sdk-9.0.100-rc.2.24474.11-linux-x64.tar.gz -C /usr/local/dotnet; \ + dotnet --info; diff --git a/CompileEnv/DotNet9/build.sh b/CompileEnv/DotNet9/build.sh new file mode 100644 index 0000000..3f7c1de --- /dev/null +++ b/CompileEnv/DotNet9/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-compile:dotnet9 . \ No newline at end of file diff --git a/CompositeEnv/Binary/Dockerfile b/CompositeEnv/Binary/Dockerfile new file mode 100644 index 0000000..a4731af --- /dev/null +++ b/CompositeEnv/Binary/Dockerfile @@ -0,0 +1,11 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +WORKDIR /home/admin +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 \ + tar \ + wget \ + net-tools \ + bind-utils -y; diff --git a/CompositeEnv/Binary/build.sh b/CompositeEnv/Binary/build.sh new file mode 100644 index 0000000..ff3816c --- /dev/null +++ b/CompositeEnv/Binary/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-runtime:alinux3 . \ No newline at end of file diff --git a/RuntimeEnv/Java11/Dockerfile b/CompositeEnv/Java11/Dockerfile similarity index 87% rename from RuntimeEnv/Java11/Dockerfile rename to CompositeEnv/Java11/Dockerfile index 0ad8d5f..d3fbcd9 100644 --- a/RuntimeEnv/Java11/Dockerfile +++ b/CompositeEnv/Java11/Dockerfile @@ -7,7 +7,11 @@ WORKDIR /home/admin ADD jdk-11.0.2.tar.gz ./ 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 tar wget net-tools bind-utils -y; \ + yum install \ + tar \ + wget \ + net-tools \ + bind-utils -y; \ mv ./jdk-11.0.2 ${JAVA_HOME}; \ chmod +x ${JAVA_HOME}/bin/*; \ java -version; diff --git a/RuntimeEnv/Java11/build.sh b/CompositeEnv/Java11/build.sh similarity index 100% rename from RuntimeEnv/Java11/build.sh rename to CompositeEnv/Java11/build.sh diff --git a/RuntimeEnv/Java17/Dockerfile b/CompositeEnv/Java17/Dockerfile similarity index 87% rename from RuntimeEnv/Java17/Dockerfile rename to CompositeEnv/Java17/Dockerfile index bbe363f..22177c0 100644 --- a/RuntimeEnv/Java17/Dockerfile +++ b/CompositeEnv/Java17/Dockerfile @@ -7,7 +7,11 @@ WORKDIR /home/admin ADD jdk-17.0.2.tar.gz ./ 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 tar wget net-tools bind-utils -y; \ + yum install \ + tar \ + wget \ + net-tools \ + bind-utils -y; \ mv ./jdk-17.0.2 ${JAVA_HOME}; \ chmod +x ${JAVA_HOME}/bin/*; \ java -version; diff --git a/RuntimeEnv/Java17/build.sh b/CompositeEnv/Java17/build.sh similarity index 100% rename from RuntimeEnv/Java17/build.sh rename to CompositeEnv/Java17/build.sh diff --git a/RuntimeEnv/Java21/Dockerfile b/CompositeEnv/Java21/Dockerfile similarity index 87% rename from RuntimeEnv/Java21/Dockerfile rename to CompositeEnv/Java21/Dockerfile index 634aac3..85e3f6b 100644 --- a/RuntimeEnv/Java21/Dockerfile +++ b/CompositeEnv/Java21/Dockerfile @@ -7,7 +7,11 @@ WORKDIR /home/admin ADD jdk-21.0.2.tar.gz ./ 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 tar wget net-tools bind-utils -y; \ + yum install \ + tar \ + wget \ + net-tools \ + bind-utils -y; \ mv ./jdk-21.0.2 ${JAVA_HOME}; \ chmod +x ${JAVA_HOME}/bin/*; \ java -version; diff --git a/RuntimeEnv/Java21/build.sh b/CompositeEnv/Java21/build.sh similarity index 100% rename from RuntimeEnv/Java21/build.sh rename to CompositeEnv/Java21/build.sh diff --git a/CompositeEnv/Python3/Dockerfile b/CompositeEnv/Python3/Dockerfile new file mode 100644 index 0000000..a0ab72f --- /dev/null +++ b/CompositeEnv/Python3/Dockerfile @@ -0,0 +1,34 @@ +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/ \ No newline at end of file diff --git a/CompositeEnv/Python3/build.sh b/CompositeEnv/Python3/build.sh new file mode 100644 index 0000000..bc9f3a9 --- /dev/null +++ b/CompositeEnv/Python3/build.sh @@ -0,0 +1,2 @@ +#./configure --enable-optimizations --with-ssl --prefix=/usr/local/python3 +docker build -t kenaito-runtime:python3 . \ No newline at end of file diff --git a/CompositeEnv/Python3/pip.conf b/CompositeEnv/Python3/pip.conf new file mode 100644 index 0000000..4591cae --- /dev/null +++ b/CompositeEnv/Python3/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 diff --git a/README.md b/README.md index 4efbec0..bf4b5f7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # dockerfiles -应用、中间件镜像定制 +应用环境镜像定制 # 目录说明 -- RuntimeEnv 应用运行环境 - - Binary 适用于amd64位二进制可执行程序 - - DotNet 适用于dotnet应用 - - Java 适用于java应用 - - Python 适用于python应用 \ No newline at end of file +- CompileEnv 编译环境 +- RuntimeEnv 运行环境 +- CompositeEnv 编译与运行环境 + +# 支持的语言 +- Binary 适用于amd64位二进制可执行程序 +- DotNet 适用于dotnet应用 +- Java 适用于java应用 +- Python 适用于python应用 \ No newline at end of file diff --git a/RuntimeEnv/DotNet6/Dockerfile b/RuntimeEnv/DotNet6/Dockerfile new file mode 100644 index 0000000..3ccfbe7 --- /dev/null +++ b/RuntimeEnv/DotNet6/Dockerfile @@ -0,0 +1,31 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV DOTNET_HOME=/usr/local/dotnet +ENV PATH="${DOTNET_HOME}:$PATH" +WORKDIR /home/admin +# https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.35-linux-x64-binaries +ADD https://download.visualstudio.microsoft.com/download/pr/ccdb3628-8f55-411b-b0f1-669d42604ad8/81283ab8762aaab1be72772711f07f86/aspnetcore-runtime-6.0.35-linux-x64.tar.gz ./ +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; \ + mkdir /usr/local/dotnet; \ + tar -xzvf aspnetcore-runtime-6.0.35-linux-x64.tar.gz -C /usr/local/dotnet; \ + dotnet --info; diff --git a/RuntimeEnv/DotNet6/build.sh b/RuntimeEnv/DotNet6/build.sh new file mode 100644 index 0000000..0cd9954 --- /dev/null +++ b/RuntimeEnv/DotNet6/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-runtime:dotnet6 . \ No newline at end of file diff --git a/RuntimeEnv/DotNet8/Dockerfile b/RuntimeEnv/DotNet8/Dockerfile new file mode 100644 index 0000000..2737c9f --- /dev/null +++ b/RuntimeEnv/DotNet8/Dockerfile @@ -0,0 +1,31 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV DOTNET_HOME=/usr/local/dotnet +ENV PATH="${DOTNET_HOME}:$PATH" +WORKDIR /home/admin +# https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.10-linux-x64-binaries +ADD https://download.visualstudio.microsoft.com/download/pr/6d143cf6-e215-428e-bcde-9fd50ea0e1be/99652e31b3e0161a3f1f933e0bedf223/aspnetcore-runtime-8.0.10-linux-x64.tar.gz ./ +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; \ + mkdir /usr/local/dotnet; \ + tar -xzvf aspnetcore-runtime-8.0.10-linux-x64.tar.gz -C /usr/local/dotnet; \ + dotnet --info; diff --git a/RuntimeEnv/DotNet8/build.sh b/RuntimeEnv/DotNet8/build.sh new file mode 100644 index 0000000..4c27e51 --- /dev/null +++ b/RuntimeEnv/DotNet8/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-runtime:dotnet8 . \ No newline at end of file diff --git a/RuntimeEnv/DotNet9/Dockerfile b/RuntimeEnv/DotNet9/Dockerfile new file mode 100644 index 0000000..b49f583 --- /dev/null +++ b/RuntimeEnv/DotNet9/Dockerfile @@ -0,0 +1,31 @@ +FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest +LABEL MAINTAINER="tianjun@odboy.cn" +ENV TimeZone=Asia/Shanghai +ENV DOTNET_HOME=/usr/local/dotnet +ENV PATH="${DOTNET_HOME}:$PATH" +WORKDIR /home/admin +# https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-9.0.0-rc.2-linux-x64-binaries +ADD https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/9.0.0-rc.2.24474.3/aspnetcore-runtime-9.0.0-rc.2.24474.3-linux-x64.tar.gz ./ +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; \ + mkdir /usr/local/dotnet; \ + tar -xzvf aspnetcore-runtime-9.0.0-rc.2.24474.3-linux-x64.tar.gz -C /usr/local/dotnet; \ + dotnet --info; diff --git a/RuntimeEnv/DotNet9/build.sh b/RuntimeEnv/DotNet9/build.sh new file mode 100644 index 0000000..f943f01 --- /dev/null +++ b/RuntimeEnv/DotNet9/build.sh @@ -0,0 +1 @@ +docker build -t kenaito-runtime:dotnet9 . \ No newline at end of file diff --git a/RuntimeEnv/Python3/Dockerfile b/RuntimeEnv/Python3/Dockerfile deleted file mode 100644 index efc5b6a..0000000 --- a/RuntimeEnv/Python3/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -#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 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 gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel net-tools -y; \ -# yum install epel-release -y; \ -# cd Python-3.10.0; \ -# ./configure --prefix=/usr/local/python3 --enable-optimizations; \ -# make && make install; \ -# python3 -V; diff --git a/RuntimeEnv/Python3/build.sh b/RuntimeEnv/Python3/build.sh deleted file mode 100644 index 1d54b9f..0000000 --- a/RuntimeEnv/Python3/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#curl -O https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz -#docker build -t kenaito-runtime:python3 . \ No newline at end of file