$ docker pull centos:centos7.6.1810 $ docker run -itd centos:centos7.6.1810 bash $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1f7a212da655 centos:centos7.6.1810 "bash" About a minute ago Up About a minute determined_feistel $ docker exec -it 1f7 bash
[root@1f7a212da655 yum.repos.d]# ls -lrt total 64 -rw-r--r-- 1 root root 314 Nov 23 2018 CentOS-fasttrack.repo.bak -rw-r--r-- 1 root root 5701 Nov 23 2018 CentOS-Vault.repo.bak -rw-r--r-- 1 root root 1331 Nov 23 2018 CentOS-Sources.repo.bak -rw-r--r-- 1 root root 630 Nov 23 2018 CentOS-Media.repo.bak -rw-r--r-- 1 root root 649 Nov 23 2018 CentOS-Debuginfo.repo.bak -rw-r--r-- 1 root root 1309 Nov 23 2018 CentOS-CR.repo.bak -rw-r--r-- 1 root root 1664 Nov 23 2018 CentOS-Base.repo.bak -rw-r--r-- 1 root root 1724 Jul 3 14:02 CentOS-Base.repo -rw-r--r-- 1 root root 1309 Jul 3 14:02 CentOS-CR.repo -rw-r--r-- 1 root root 649 Jul 3 14:02 CentOS-Debuginfo.repo -rw-r--r-- 1 root root 630 Jul 3 14:02 CentOS-Media.repo -rw-r--r-- 1 root root 1331 Jul 3 14:02 CentOS-Sources.repo -rw-r--r-- 1 root root 5701 Jul 3 14:02 CentOS-Vault.repo -rw-r--r-- 1 root root 329 Jul 3 14:02 CentOS-fasttrack.repo [root@1f7a212da655 yum.repos.d]# [root@1f7a212da655 yum.repos.d]# [root@1f7a212da655 yum.repos.d]# head -n 20 CentOS-Base.repo # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # #
[base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates
$ yum install --downloadonly --downloaddir=./pkg httpd-tools Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package httpd-tools.x86_64 0:2.4.6-89.el7.centos.1 will be installed --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-tools-2.4.6-89.el7.centos.1.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-tools-2.4.6-89.el7.centos.1.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed --> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================================Installing: httpd-tools x86_64 2.4.6-89.el7.centos.1 updates 91 k Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k apr-util x86_64 1.5.2-6.el7 base 92 k
Total download size: 286 k Installed size: 584 k Background downloading packages, then exiting: warning: /root/*/apr-util-1.5.2-6.el7.x86_64.rpm.47.tmp: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY ] 0.0 B/s | 0 B --:--:-- ETA Public key for apr-util-1.5.2-6.el7.x86_64.rpm.47.tmp is not installed (1/3): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00 (2/3): apr-1.4.8-3.el7_4.1.x86_64.rpm | 103 kB 00:00:00 Public key for httpd-tools-2.4.6-89.el7.centos.1.x86_64.rpm.47.tmp is not installed (3/3): httpd-tools-2.4.6-89.el7.centos.1.x86_64.rpm | 91 kB 00:00:00 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total 584 kB/s | 286 kB 00:00:00 exiting because "Download Only" specified