[root@hadoop101 mycentos]# docker build -f dockerfile-mycentos -t mysentos:1.0 .
Sending build context to Docker daemon 2.56kB
Step 1/14 : FROM centos
—> 5d0da3dc9764
Step 2/14 : MAINTAINER zhangbao<zhangbaohpu@163.com>
—> Running in 79ff0ddc554d
Removing intermediate container 79ff0ddc554d
—> 0cc1bf4a4ba0
Step 3/14 : ENV MYPATH /usr/local
—> Running in 59d3d432c58c
Removing intermediate container 59d3d432c58c
—> 839ed1e4b944
Step 4/14 : WORKDIR $MYPATH
—> Running in d085e4887d92
Removing intermediate container d085e4887d92
—> 41c10774900b
Step 5/14 : RUN tar cvf /etc/yum.repos.d.tar /etc/yum.repos.d
—> Running in 1ab58ab850c0
/etc/yum.repos.d/
/etc/yum.repos.d/CentOS-Linux-AppStream.repo
/etc/yum.repos.d/CentOS-Linux-BaseOS.repo
/etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo
/etc/yum.repos.d/CentOS-Linux-Debuginfo.repo
/etc/yum.repos.d/CentOS-Linux-Devel.repo
/etc/yum.repos.d/CentOS-Linux-Extras.repo
/etc/yum.repos.d/CentOS-Linux-FastTrack.repo
/etc/yum.repos.d/CentOS-Linux-HighAvailability.repo
/etc/yum.repos.d/CentOS-Linux-Media.repo
/etc/yum.repos.d/CentOS-Linux-Plus.repo
/etc/yum.repos.d/CentOS-Linux-PowerTools.repo
/etc/yum.repos.d/CentOS-Linux-Sources.repo
tar: Removing leading `/ from member names
Removing intermediate container 1ab58ab850c0
—> bfd1c4cd694c
Step 6/14 : RUN curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
—> Running in 73ebef623f8a
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2495 100 2495 0 0 12351 0 –:–:– –:–:– –:–:– 12351
Removing intermediate container 73ebef623f8a
—> 22812c68f967
Step 7/14 : RUN rm -rf /etc/yum.repos.d/CentOS-Linux-*
—> Running in eb8426f499b0
Removing intermediate container eb8426f499b0
—> 8dc6bd0b4e84
Step 8/14 : RUN yum clean all
—> Running in a508fb503158
0 files removed
Removing intermediate container a508fb503158
—> c6831cfda20f
Step 9/14 : RUN yum makecache
—> Running in 67c3f0dc0a6a
CentOS-8.5.2111 – Base – mirrors.aliyun.com 16 MB/s | 4.6 MB 00:00
CentOS-8.5.2111 – Extras – mirrors.aliyun.com 45 kB/s | 10 kB 00:00
CentOS-8.5.2111 – AppStream – mirrors.aliyun.co 16 MB/s | 8.4 MB 00:00
Metadata cache created.
Removing intermediate container 67c3f0dc0a6a
—> 6ca3b2fbeb13
Step 10/14 : RUN yum -y install vim
—> Running in e81b9f1a4705
Last metadata expiration check: 0:00:05 ago on Tue Apr 5 09:35:43 2022.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
vim-enhanced x86_64 2:8.0.1763-16.el8 AppStream 1.4 M
Installing dependencies:
gpm-libs x86_64 1.20.7-17.el8 AppStream 39 k
vim-common x86_64 2:8.0.1763-16.el8 AppStream 6.3 M
vim-filesystem noarch 2:8.0.1763-16.el8 AppStream 49 k
which x86_64 2.21-16.el8 base 49 k
Transaction Summary
================================================================================
Install 5 Packages
Total download size: 7.8 M
Installed size: 30 M
Downloading Packages:
(1/5): gpm-libs-1.20.7-17.el8.x86_64.rpm 235 kB/s | 39 kB 00:00
(2/5): which-2.21-16.el8.x86_64.rpm 203 kB/s | 49 kB 00:00
(3/5): vim-filesystem-8.0.1763-16.el8.noarch.rp 776 kB/s | 49 kB 00:00
(4/5): vim-common-8.0.1763-16.el8.x86_64.rpm 16 MB/s | 6.3 MB 00:00
(5/5): vim-enhanced-8.0.1763-16.el8.x86_64.rpm 5.4 MB/s | 1.4 MB 00:00
——————————————————————————–
Total 19 MB/s | 7.8 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : vim-filesystem-2:8.0.1763-16.el8.noarch 1/5
Installing : vim-common-2:8.0.1763-16.el8.x86_64 2/5
Installing : gpm-libs-1.20.7-17.el8.x86_64 3/5
Running scriptlet: gpm-libs-1.20.7-17.el8.x86_64 3/5
Installing : which-2.21-16.el8.x86_64 4/5
Installing : vim-enhanced-2:8.0.1763-16.el8.x86_64 5/5
Running scriptlet: vim-enhanced-2:8.0.1763-16.el8.x86_64 5/5
Running scriptlet: vim-common-2:8.0.1763-16.el8.x86_64 5/5
Verifying : which-2.21-16.el8.x86_64 1/5
Verifying : gpm-libs-1.20.7-17.el8.x86_64 2/5
Verifying : vim-common-2:8.0.1763-16.el8.x86_64 3/5
Verifying : vim-enhanced-2:8.0.1763-16.el8.x86_64 4/5
Verifying : vim-filesystem-2:8.0.1763-16.el8.noarch 5/5
Installed:
gpm-libs-1.20.7-17.el8.x86_64 vim-common-2:8.0.1763-16.el8.x86_64
vim-enhanced-2:8.0.1763-16.el8.x86_64 vim-filesystem-2:8.0.1763-16.el8.noarch
which-2.21-16.el8.x86_64
Complete!
Removing intermediate container e81b9f1a4705
—> 3d731b0904e6
Step 11/14 : RUN yum -y install net-tools
—> Running in f45f6c7c9c8c
Last metadata expiration check: 0:00:17 ago on Tue Apr 5 09:35:43 2022.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
net-tools x86_64 2.0-0.52.20160912git.el8 base 322 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 322 k
Installed size: 942 k
Downloading Packages:
net-tools-2.0-0.52.20160912git.el8.x86_64.rpm 934 kB/s | 322 kB 00:00
——————————————————————————–
Total 930 kB/s | 322 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : net-tools-2.0-0.52.20160912git.el8.x86_64 1/1
Running scriptlet: net-tools-2.0-0.52.20160912git.el8.x86_64 1/1
Verifying : net-tools-2.0-0.52.20160912git.el8.x86_64 1/1
Installed:
net-tools-2.0-0.52.20160912git.el8.x86_64
Complete!
Removing intermediate container f45f6c7c9c8c
—> adc0f183e07e
Step 12/14 : EXPOSE 80
—> Running in 9422041e18c2
Removing intermediate container 9422041e18c2
—> e94ae254891f
Step 13/14 : CMD echo “–end–“
—> Running in 9183b6a1444d
Removing intermediate container 9183b6a1444d
—> c3978bb3cb17
Step 14/14 : CMD /bin/bash
—> Running in 536c8de964d3
Removing intermediate container 536c8de964d3
—> 68f0ddc7c99f
Successfully built 68f0ddc7c99f
Successfully tagged mysentos:1.0
[root@hadoop101 mycentos]#