diff --git a/image/compile-dotnet6/.dockerignore b/image/compile-dotnet6/.dockerignore new file mode 100644 index 0000000..96054a7 --- /dev/null +++ b/image/compile-dotnet6/.dockerignore @@ -0,0 +1,6 @@ +# 注意:SDK/运行时压缩包(由 build.sh 预下载)经 ADD 解压进镜像, +# ADD 的源文件必须位于构建上下文内,因此 *.tar.gz 不能在这里忽略。 +build.sh +demo/ +.git/ +.DS_Store diff --git a/image/compile-dotnet6/.gitignore b/image/compile-dotnet6/.gitignore new file mode 100644 index 0000000..9a1bb28 --- /dev/null +++ b/image/compile-dotnet6/.gitignore @@ -0,0 +1,3 @@ +# 构建产物 / 本地缓存 +*.tar.gz +.DS_Store diff --git a/image/compile-dotnet6/Dockerfile b/image/compile-dotnet6/Dockerfile index 5f0832e..a334e14 100644 --- a/image/compile-dotnet6/Dockerfile +++ b/image/compile-dotnet6/Dockerfile @@ -5,25 +5,14 @@ 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 ./ +# 由 build.sh 预先下载到本目录 +ADD dotnet-sdk-6.0.427-linux-x64.tar.gz /usr/local/dotnet/ +# gcc/make 用于编译含原生代码的 NuGet 包;sysstat/net-tools 用于排障 +# libicu:.NET 全球化(CultureInfo/TimeZoneInfo)必需,缺了 dotnet 命令会直接 Abort RUN 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 \ + make \ + libicu \ 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/image/compile-dotnet6/build.sh b/image/compile-dotnet6/build.sh old mode 100644 new mode 100755 index cab6543..516bd4b --- a/image/compile-dotnet6/build.sh +++ b/image/compile-dotnet6/build.sh @@ -1,3 +1,15 @@ +#!/usr/bin/env bash +# 先下载 dotnet-sdk 到当前目录,再基于本地文件构建镜像 +set -euo pipefail +cd "$(dirname "$0")" + +SDK=dotnet-sdk-6.0.427-linux-x64.tar.gz +URL=https://download.visualstudio.microsoft.com/download/pr/12ee34e8-640c-400e-a6dc-4892b442df92/81d40fc98a5bbbfbafa4cc1ab86d6288/${SDK} + +if [ ! -f "${SDK}" ]; then + curl -fL -o "${SDK}" "${URL}" +fi + IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:compile-dotnet6 docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/compile-dotnet8/.dockerignore b/image/compile-dotnet8/.dockerignore new file mode 100644 index 0000000..27203f2 --- /dev/null +++ b/image/compile-dotnet8/.dockerignore @@ -0,0 +1,5 @@ +# 由 build.sh 预下载的 SDK 压缩包经 ADD 解压进镜像, +# ADD 的源文件必须在构建上下文内,因此 *.tar.gz 不能在这里忽略 +build.sh +.git/ +.DS_Store diff --git a/image/compile-dotnet8/.gitignore b/image/compile-dotnet8/.gitignore new file mode 100644 index 0000000..9a1bb28 --- /dev/null +++ b/image/compile-dotnet8/.gitignore @@ -0,0 +1,3 @@ +# 构建产物 / 本地缓存 +*.tar.gz +.DS_Store diff --git a/image/compile-dotnet8/Dockerfile b/image/compile-dotnet8/Dockerfile index 58f1133..fa0806f 100644 --- a/image/compile-dotnet8/Dockerfile +++ b/image/compile-dotnet8/Dockerfile @@ -5,25 +5,14 @@ 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 ./ +# 由 build.sh 预先下载到本目录 +ADD dotnet-sdk-8.0.403-linux-x64.tar.gz /usr/local/dotnet/ +# gcc/make 用于编译含原生代码的 NuGet 包;sysstat/net-tools 用于排障 +# libicu:.NET 全球化(CultureInfo/TimeZoneInfo)必需,缺了 dotnet 命令会直接 Abort RUN 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 \ + make \ + libicu \ 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/image/compile-dotnet8/build.sh b/image/compile-dotnet8/build.sh old mode 100644 new mode 100755 index 2d10d30..8ffabc3 --- a/image/compile-dotnet8/build.sh +++ b/image/compile-dotnet8/build.sh @@ -1,3 +1,15 @@ +#!/usr/bin/env bash +# 先下载 dotnet-sdk 到当前目录,再基于本地文件构建镜像 +set -euo pipefail +cd "$(dirname "$0")" + +SDK=dotnet-sdk-8.0.403-linux-x64.tar.gz +URL=https://download.visualstudio.microsoft.com/download/pr/ca6cd525-677e-4d3a-b66c-11348a6f920a/ec395f498f89d0ca4d67d903892af82d/${SDK} + +if [ ! -f "${SDK}" ]; then + curl -fL -o "${SDK}" "${URL}" +fi + IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:compile-dotnet8 docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/compile-dotnet9/.dockerignore b/image/compile-dotnet9/.dockerignore new file mode 100644 index 0000000..27203f2 --- /dev/null +++ b/image/compile-dotnet9/.dockerignore @@ -0,0 +1,5 @@ +# 由 build.sh 预下载的 SDK 压缩包经 ADD 解压进镜像, +# ADD 的源文件必须在构建上下文内,因此 *.tar.gz 不能在这里忽略 +build.sh +.git/ +.DS_Store diff --git a/image/compile-dotnet9/.gitignore b/image/compile-dotnet9/.gitignore new file mode 100644 index 0000000..9a1bb28 --- /dev/null +++ b/image/compile-dotnet9/.gitignore @@ -0,0 +1,3 @@ +# 构建产物 / 本地缓存 +*.tar.gz +.DS_Store diff --git a/image/compile-dotnet9/Dockerfile b/image/compile-dotnet9/Dockerfile index d51fbef..a5db896 100644 --- a/image/compile-dotnet9/Dockerfile +++ b/image/compile-dotnet9/Dockerfile @@ -5,25 +5,14 @@ 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 ./ +# 由 build.sh 预先下载到本目录 +ADD dotnet-sdk-9.0.100-rc.2.24474.11-linux-x64.tar.gz /usr/local/dotnet/ +# gcc/make 用于编译含原生代码的 NuGet 包;sysstat/net-tools 用于排障 +# libicu:.NET 全球化(CultureInfo/TimeZoneInfo)必需,缺了 dotnet 命令会直接 Abort RUN 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 \ + make \ + libicu \ 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/image/compile-dotnet9/build.sh b/image/compile-dotnet9/build.sh old mode 100644 new mode 100755 index 86bd8ea..c143ede --- a/image/compile-dotnet9/build.sh +++ b/image/compile-dotnet9/build.sh @@ -1,3 +1,15 @@ +#!/usr/bin/env bash +# 先下载 dotnet-sdk 到当前目录,再基于本地文件构建镜像 +set -euo pipefail +cd "$(dirname "$0")" + +SDK=dotnet-sdk-9.0.100-rc.2.24474.11-linux-x64.tar.gz +URL=https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.100-rc.2.24474.11/${SDK} + +if [ ! -f "${SDK}" ]; then + curl -fL -o "${SDK}" "${URL}" +fi + IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:compile-dotnet9 docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/runtime-dotnet6/.dockerignore b/image/runtime-dotnet6/.dockerignore new file mode 100644 index 0000000..0e12891 --- /dev/null +++ b/image/runtime-dotnet6/.dockerignore @@ -0,0 +1,5 @@ +# 由 build.sh 预下载的运行时压缩包经 ADD 解压进镜像, +# ADD 的源文件必须在构建上下文内,因此 *.tar.gz 不能在这里忽略 +build.sh +.git/ +.DS_Store diff --git a/image/runtime-dotnet6/.gitignore b/image/runtime-dotnet6/.gitignore new file mode 100644 index 0000000..9a1bb28 --- /dev/null +++ b/image/runtime-dotnet6/.gitignore @@ -0,0 +1,3 @@ +# 构建产物 / 本地缓存 +*.tar.gz +.DS_Store diff --git a/image/runtime-dotnet6/Dockerfile b/image/runtime-dotnet6/Dockerfile index d10231d..8c4f94b 100644 --- a/image/runtime-dotnet6/Dockerfile +++ b/image/runtime-dotnet6/Dockerfile @@ -5,25 +5,12 @@ 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 ./ +# 由 build.sh 预先下载到本目录 +ADD aspnetcore-runtime-6.0.35-linux-x64.tar.gz /usr/local/dotnet/ +# sysstat/net-tools 用于排障 +# libicu:.NET 全球化(CultureInfo/TimeZoneInfo)必需,缺了 dotnet 命令会直接 Abort RUN 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 \ + libicu \ 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/image/runtime-dotnet6/build.sh b/image/runtime-dotnet6/build.sh old mode 100644 new mode 100755 index fa8caa2..ae95e15 --- a/image/runtime-dotnet6/build.sh +++ b/image/runtime-dotnet6/build.sh @@ -1,3 +1,15 @@ +#!/usr/bin/env bash +# 先下载 aspnetcore-runtime 到当前目录,再基于本地文件构建镜像 +set -euo pipefail +cd "$(dirname "$0")" + +RUNTIME=aspnetcore-runtime-6.0.35-linux-x64.tar.gz +URL=https://download.visualstudio.microsoft.com/download/pr/ccdb3628-8f55-411b-b0f1-669d42604ad8/81283ab8762aaab1be72772711f07f86/${RUNTIME} + +if [ ! -f "${RUNTIME}" ]; then + curl -fL -o "${RUNTIME}" "${URL}" +fi + IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-dotnet6 docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/runtime-dotnet8/.dockerignore b/image/runtime-dotnet8/.dockerignore new file mode 100644 index 0000000..0e12891 --- /dev/null +++ b/image/runtime-dotnet8/.dockerignore @@ -0,0 +1,5 @@ +# 由 build.sh 预下载的运行时压缩包经 ADD 解压进镜像, +# ADD 的源文件必须在构建上下文内,因此 *.tar.gz 不能在这里忽略 +build.sh +.git/ +.DS_Store diff --git a/image/runtime-dotnet8/.gitignore b/image/runtime-dotnet8/.gitignore new file mode 100644 index 0000000..9a1bb28 --- /dev/null +++ b/image/runtime-dotnet8/.gitignore @@ -0,0 +1,3 @@ +# 构建产物 / 本地缓存 +*.tar.gz +.DS_Store diff --git a/image/runtime-dotnet8/Dockerfile b/image/runtime-dotnet8/Dockerfile index e00149f..a896ab8 100644 --- a/image/runtime-dotnet8/Dockerfile +++ b/image/runtime-dotnet8/Dockerfile @@ -5,25 +5,12 @@ 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 ./ +# 由 build.sh 预先下载到本目录 +ADD aspnetcore-runtime-8.0.10-linux-x64.tar.gz /usr/local/dotnet/ +# sysstat/net-tools 用于排障 +# libicu:.NET 全球化(CultureInfo/TimeZoneInfo)必需,缺了 dotnet 命令会直接 Abort RUN 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 \ + libicu \ 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/image/runtime-dotnet8/build.sh b/image/runtime-dotnet8/build.sh old mode 100644 new mode 100755 index bdcd6f0..f9e2687 --- a/image/runtime-dotnet8/build.sh +++ b/image/runtime-dotnet8/build.sh @@ -1,3 +1,15 @@ +#!/usr/bin/env bash +# 先下载 aspnetcore-runtime 到当前目录,再基于本地文件构建镜像 +set -euo pipefail +cd "$(dirname "$0")" + +RUNTIME=aspnetcore-runtime-8.0.10-linux-x64.tar.gz +URL=https://download.visualstudio.microsoft.com/download/pr/6d143cf6-e215-428e-bcde-9fd50ea0e1be/99652e31b3e0161a3f1f933e0bedf223/${RUNTIME} + +if [ ! -f "${RUNTIME}" ]; then + curl -fL -o "${RUNTIME}" "${URL}" +fi + IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-dotnet8 docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/runtime-dotnet9/.dockerignore b/image/runtime-dotnet9/.dockerignore new file mode 100644 index 0000000..0e12891 --- /dev/null +++ b/image/runtime-dotnet9/.dockerignore @@ -0,0 +1,5 @@ +# 由 build.sh 预下载的运行时压缩包经 ADD 解压进镜像, +# ADD 的源文件必须在构建上下文内,因此 *.tar.gz 不能在这里忽略 +build.sh +.git/ +.DS_Store diff --git a/image/runtime-dotnet9/.gitignore b/image/runtime-dotnet9/.gitignore new file mode 100644 index 0000000..9a1bb28 --- /dev/null +++ b/image/runtime-dotnet9/.gitignore @@ -0,0 +1,3 @@ +# 构建产物 / 本地缓存 +*.tar.gz +.DS_Store diff --git a/image/runtime-dotnet9/Dockerfile b/image/runtime-dotnet9/Dockerfile index 8a4e149..05a1cc1 100644 --- a/image/runtime-dotnet9/Dockerfile +++ b/image/runtime-dotnet9/Dockerfile @@ -5,25 +5,12 @@ 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 ./ +# 由 build.sh 预先下载到本目录 +ADD aspnetcore-runtime-9.0.0-rc.2.24474.3-linux-x64.tar.gz /usr/local/dotnet/ +# sysstat/net-tools 用于排障 +# libicu:.NET 全球化(CultureInfo/TimeZoneInfo)必需,缺了 dotnet 命令会直接 Abort RUN 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 \ + libicu \ 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/image/runtime-dotnet9/build.sh b/image/runtime-dotnet9/build.sh old mode 100644 new mode 100755 index cac9c26..5e11a47 --- a/image/runtime-dotnet9/build.sh +++ b/image/runtime-dotnet9/build.sh @@ -1,3 +1,15 @@ +#!/usr/bin/env bash +# 先下载 aspnetcore-runtime 到当前目录,再基于本地文件构建镜像 +set -euo pipefail +cd "$(dirname "$0")" + +RUNTIME=aspnetcore-runtime-9.0.0-rc.2.24474.3-linux-x64.tar.gz +URL=https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/9.0.0-rc.2.24474.3/${RUNTIME} + +if [ ! -f "${RUNTIME}" ]; then + curl -fL -o "${RUNTIME}" "${URL}" +fi + IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-dotnet9 docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/system-alinux3/Dockerfile b/image/system-alinux3/Dockerfile index 763403f..159d897 100644 --- a/image/system-alinux3/Dockerfile +++ b/image/system-alinux3/Dockerfile @@ -5,4 +5,6 @@ ENV TimeZone=Asia/Shanghai WORKDIR /home/admin # 升级会有很多问题,比如nginx编译失败等 -#RUN yum update -y && yum clean all; \ No newline at end of file +#RUN yum update -y && yum clean all; +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; \ No newline at end of file