Skip to content

Commit

Permalink
perf: 构建打包速度优化 TencentBlueKing#3278
Browse files Browse the repository at this point in the history
1.新增工具集基础镜像,含JDK与Python,migration镜像改为依赖工具集基础镜像;
2.为各Dockerfile添加版本标签dockerfile.version。
  • Loading branch information
jsonwan committed Nov 3, 2024
1 parent 52ae448 commit b76e3d6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
1 change: 1 addition & 0 deletions support-files/kubernetes/images/backend/backend.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 1 addition & 6 deletions support-files/kubernetes/images/backend/jdk.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -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
1 change: 1 addition & 0 deletions support-files/kubernetes/images/backend/os.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM centos:7

LABEL maintainer="Tencent BlueKing Job"
LABEL dockerfile.version="0.0.2"

ENV LANG="en_US.UTF-8"

Expand Down
20 changes: 20 additions & 0 deletions support-files/kubernetes/images/backend/tool-set.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit b76e3d6

Please sign in to comment.