51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

制作 centos7.9镜像带 curl (centos70-jdk17

发现很多镜像都不能用 curl

于是白眉大叔自己制作一个,并且上传到docker 仓库

docker build -t registry.cn-hangzhou.aliyuncs.com/baimeidashu-k8s/centos79:v1 --no-cache .
2024年2月28日
FROM centos:centos7.9.2009
#command: ["tail","-f","/etc/hosts"]
CMD ["tail","-f","/etc/hosts"]

如果作为agent 需要 带 cmd 命令

Dockerfile

1- jdk17gradle74

#FROM centos:7
FROM kubesphere/builder-maven:v3.2.0
#FROM kubespheredev/builder-base:v3.1.0
MAINTAINER zhaozhiyong  "715740383@qq.com"
WORKDIR /jdk
ADD jdk-17_linux-x64_bin.tar.gz /jdk/
ADD gradle-7.4-bin.tar.gz  /gradle/
 
ENV JAVA_HOME=/jdk/jdk-17.0.9
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV GRADLE_HOME=/gradle/gradle-7.4
ENV PATH=$JAVA_HOME/bin:$PATH:$GRADLE_HOME/bin
CMD ["java","-version"]
#CMD ["gradle","-version"]

2- centos79-jdk-jmx

FROM centos:centos7.9.2009
ADD jmx_prometheus_javaagent-0.20.0.jar  /jmx.jar
ADD jmx.yaml /jmx.yaml

ADD jdk-17_linux-x64_bin.tar.gz /jdk/
ENV JAVA_HOME=/jdk/jdk-17.0.9
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH=$JAVA_HOME/bin:$PATH
赞(2)
未经允许不得转载:工具盒子 » 制作 centos7.9镜像带 curl (centos70-jdk17