From b76e3d604cb4c01f011fb3257dbc63155d4542db Mon Sep 17 00:00:00 2001 From: jsonwan Date: Sun, 3 Nov 2024 15:40:16 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=9E=84=E5=BB=BA=E6=89=93=E5=8C=85?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=E4=BC=98=E5=8C=96=20#3278?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.新增工具集基础镜像,含JDK与Python,migration镜像改为依赖工具集基础镜像; 2.为各Dockerfile添加版本标签dockerfile.version。 --- .../images/backend/backend.Dockerfile | 1 + .../kubernetes/images/backend/jdk.Dockerfile | 7 +------ .../kubernetes/images/backend/os.Dockerfile | 1 + .../images/backend/tool-set.Dockerfile | 20 +++++++++++++++++++ .../images/migration/migration.Dockerfile | 3 ++- 5 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 support-files/kubernetes/images/backend/tool-set.Dockerfile diff --git a/support-files/kubernetes/images/backend/backend.Dockerfile b/support-files/kubernetes/images/backend/backend.Dockerfile index b73fa152f6..78fe2bba6c 100644 --- a/support-files/kubernetes/images/backend/backend.Dockerfile +++ b/support-files/kubernetes/images/backend/backend.Dockerfile @@ -1,6 +1,7 @@ FROM bkjob/jdk:0.0.3 LABEL maintainer="Tencent BlueKing Job" +LABEL dockerfile.version="0.0.1" ENV BK_JOB_HOME=/data/job/exec diff --git a/support-files/kubernetes/images/backend/jdk.Dockerfile b/support-files/kubernetes/images/backend/jdk.Dockerfile index 51f0282997..291fceb040 100644 --- a/support-files/kubernetes/images/backend/jdk.Dockerfile +++ b/support-files/kubernetes/images/backend/jdk.Dockerfile @@ -1,6 +1,7 @@ FROM bkjob/os:0.0.2 LABEL maintainer="Tencent BlueKing Job" +LABEL dockerfile.version="0.0.3" ## 安装JDK RUN mkdir -p /data && \ @@ -11,9 +12,3 @@ RUN mkdir -p /data && \ ENV JAVA_HOME=/data/TencentKona-8.0.3-262 ENV PATH=${JAVA_HOME}/bin:$PATH ENV CLASSPATH=.:${JAVA_HOME}/lib -## 安装Python -RUN yum install -y epel-release -RUN yum install -y python-pip -RUN mkdir -p /root/.pip -RUN echo -e "[global]\nindex-url = https://pypi.tuna.tsinghua.edu.cn/simple\n[install]\ntrusted-host=pypi.tuna.tsinghua.edu.cn" > /root/.pip/pip.conf -RUN pip install requests==2.6.0 diff --git a/support-files/kubernetes/images/backend/os.Dockerfile b/support-files/kubernetes/images/backend/os.Dockerfile index 3a9a106dd8..7d7a8014bd 100644 --- a/support-files/kubernetes/images/backend/os.Dockerfile +++ b/support-files/kubernetes/images/backend/os.Dockerfile @@ -1,6 +1,7 @@ FROM centos:7 LABEL maintainer="Tencent BlueKing Job" +LABEL dockerfile.version="0.0.2" ENV LANG="en_US.UTF-8" diff --git a/support-files/kubernetes/images/backend/tool-set.Dockerfile b/support-files/kubernetes/images/backend/tool-set.Dockerfile new file mode 100644 index 0000000000..6d68187a98 --- /dev/null +++ b/support-files/kubernetes/images/backend/tool-set.Dockerfile @@ -0,0 +1,20 @@ +FROM bkjob/os:0.0.2 + +LABEL maintainer="Tencent BlueKing Job" +LABEL dockerfile.version="0.0.1" + +## 安装JDK +RUN mkdir -p /data && \ + cd /data/ &&\ + curl -OL https://github.com/Tencent/TencentKona-8/releases/download/8.0.3-GA/TencentKona8.0.3.b2_jdk_linux-x86_64_8u262.tar.gz &&\ + tar -xzf TencentKona8.0.3.b2_jdk_linux-x86_64_8u262.tar.gz &&\ + rm -f TencentKona8.0.3.b2_jdk_linux-x86_64_8u262.tar.gz +ENV JAVA_HOME=/data/TencentKona-8.0.3-262 +ENV PATH=${JAVA_HOME}/bin:$PATH +ENV CLASSPATH=.:${JAVA_HOME}/lib +## 安装Python +RUN yum install -y epel-release +RUN yum install -y python-pip +RUN mkdir -p /root/.pip +RUN echo -e "[global]\nindex-url = https://pypi.tuna.tsinghua.edu.cn/simple\n[install]\ntrusted-host=pypi.tuna.tsinghua.edu.cn" > /root/.pip/pip.conf +RUN pip install requests==2.6.0 diff --git a/support-files/kubernetes/images/migration/migration.Dockerfile b/support-files/kubernetes/images/migration/migration.Dockerfile index b792b71a10..7be98a992d 100644 --- a/support-files/kubernetes/images/migration/migration.Dockerfile +++ b/support-files/kubernetes/images/migration/migration.Dockerfile @@ -1,6 +1,7 @@ -FROM bkjob/jdk:0.0.4 +FROM bkjob/tool-set:0.0.1 LABEL maintainer="Tencent BlueKing Job" +LABEL dockerfile.version="0.0.1" ENV BK_JOB_HOME=/data/job/exec