文章目录
前言
接上篇文章,帮同事在openjdk:8镜像中再安装一个ceph-common包
修改Dokcerfile
不墨迹,直接上干货,新增如下命令
RUN echo "deb https://download.ceph.com/debian-quincy/ bullseye main" >>/etc/apt/sources.list
RUN wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
RUN bash -c 'touch /app.jar'
RUN apt-get clean
RUN apt-get update
RUN apt-get install -y curl telnet vim iputils-ping net-tools
RUN apt-get install -y ceph-common
RUN ceph -v
构建过程
Sending build context to Docker daemon 96.33MB
Step 1/14 : FROM openjdk:8
---> b273004037cc
Step 2/14 : RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" >/etc/apt/sources.list
---> Using cache
---> ea5189455f8b
Step 3/14 : RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >>/etc/apt/sources.list
---> Using cache
---> 859b218f4aef
Step 4/14 : RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >>/etc/apt/sources.list
---> Using cache
---> 88a9568408ca
Step 5/14 : RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >>/etc/apt/sources.list
---> Using cache
---> 95f37a9b9886
Step 6/14 : RUN echo "deb https://download.ceph.com/debian-quincy/ bullseye main" >>/etc/apt/sources.list
---> Using cache
---> 0cbec4f1d263
Step 7/14 : RUN wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
---> Using cache
---> 1b4967cebc69
Step 8/14 : RUN bash -c 'touch /app.jar'
---> Using cache
---> 009c1bd40960
Step 9/14 : RUN apt-get clean
---> Using cache
---> c593b3c753c3
Step 10/14 : RUN apt-get update
---> Using cache
---> 779224cf455a
Step 11/14 : RUN apt-get install -y curl telnet vim iputils-ping net-tools
---> Using cache
---> 9b076259a513
Step 12/14 : RUN apt-get install -y ceph-common
---> Using cache
---> aa5e3b87e062
Step 13/14 : RUN ceph -v
---> Running in 2c89f676fe9f
ceph version 17.2.5 (98318ae89f1a893a6ded3a640405cdbb33e08757) quincy (stable)
Removing intermediate container 2c89f676fe9f
---> ea87a462d6da
总结
这里只记录了安装的核心步骤,基础环境在上篇文章中。