docker 使用supermin5工具制作镜像并且编写相应的dockerFile文件,并使用此文件来制作相应的镜像。两种方法进行例子分析
Posted 抛物线.
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker 使用supermin5工具制作镜像并且编写相应的dockerFile文件,并使用此文件来制作相应的镜像。两种方法进行例子分析相关的知识,希望对你有一定的参考价值。
一 使用supermin5命令(若命令不存在则自己安装)构建centos7系统的docker镜像,镜像名称为centos-7,镜像预装yum、net-tools、initscripts和vi命令,构建完成后提交镜像仓库上传操作,并查看此镜像。
1 针对于这个案例,我们首先安装我们的supermin5 工具
[root@server media]# yum install -y supermin5
Loaded plugins: fastestmirror
centos | 3.6 kB 00:00:00
docker | 2.9 kB 00:00:00
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package supermin5.x86_64 0:5.1.10-1.2.el7 will be installed
--> Processing Dependency: yum-utils for package: supermin5-5.1.10-1.2.el7.x86_64
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-34.el7 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-34.el7.noarch
--> Running transaction check
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-1.el7_1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
supermin5 x86_64 5.1.10-1.2.el7 centos 574 k
Installing for dependencies:
python-chardet noarch 2.2.1-1.el7_1 centos 227 k
python-kitchen noarch 1.1.1-5.el7 centos 267 k
yum-utils noarch 1.1.31-34.el7 centos 113 k
Transaction Summary
=======================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 1.2 M
Installed size: 4.3 M
Downloading packages:
---------------------------------------------------------------------------------------------------------------------------------------
Total 49 MB/s | 1.2 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python-chardet-2.2.1-1.el7_1.noarch 1/4
Installing : python-kitchen-1.1.1-5.el7.noarch 2/4
Installing : yum-utils-1.1.31-34.el7.noarch 3/4
Installing : supermin5-5.1.10-1.2.el7.x86_64 4/4
Verifying : python-kitchen-1.1.1-5.el7.noarch 1/4
Verifying : supermin5-5.1.10-1.2.el7.x86_64 2/4
Verifying : yum-utils-1.1.31-34.el7.noarch 3/4
Verifying : python-chardet-2.2.1-1.el7_1.noarch 4/4
Installed:
supermin5.x86_64 0:5.1.10-1.2.el7
Dependency Installed:
python-chardet.noarch 0:2.2.1-1.el7_1 python-kitchen.noarch 0:1.1.1-5.el7 yum-utils.noarch 0:1.1.31-34.el7
Complete!
2 下面开始使用supermin5制作我们所需要的镜像所需的安装包。
下面命令是准备要安装的软件包并保存在supermin.d目录下
[root@server media]# supermin5 -v --prepare bash yum net-tools initscripts vi coreutils -o supermin.d
supermin: version: 5.1.10
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: prepare: bash yum net-tools initscripts vi coreutils
supermin: packages specified on the command line:
- bash-4.2.46-19.el7.x86_64
- yum-3.4.3-132.el7.centos.0.1.noarch
- initscripts-9.49.30-1.el7.x86_64
- coreutils-8.22-15.el7.x86_64
supermin: writing supermin.d.1tcmz1m8/packages
supermin: after resolving dependencies there are 135 packages:
- acl-2.2.51-12.el7.x86_64
- audit-libs-2.4.1-5.el7.x86_64
- basesystem-10.0-7.el7.centos.noarch
- bash-4.2.46-19.el7.x86_64
- binutils-2.23.52.0.1-55.el7.x86_64
- bzip2-libs-1.0.6-13.el7.x86_64
- ca-certificates-2015.2.4-71.el7.noarch
- centos-release-7-2.1511.el7.centos.2.10.x86_64
- chkconfig-1.3.61-5.el7.x86_64
- coreutils-8.22-15.el7.x86_64
- cpio-2.11-24.el7.x86_64
- cracklib-2.9.0-11.el7.x86_64
- cracklib-dicts-2.9.0-11.el7.x86_64
- cryptsetup-libs-1.6.7-1.el7.x86_64
- curl-7.29.0-25.el7.centos.x86_64
- cyrus-sasl-lib-2.1.26-19.2.el7.x86_64
- dbus-1:1.6.12-13.el7.x86_64
- dbus-libs-1:1.6.12-13.el7.x86_64
- device-mapper-7:1.02.107-5.el7.x86_64
- device-mapper-libs-7:1.02.107-5.el7.x86_64
- diffutils-3.3-4.el7.x86_64
- dracut-033-502.el7_4.1.x86_64
- elfutils-libelf-0.163-3.el7.x86_64
- elfutils-libs-0.163-3.el7.x86_64
- expat-2.1.0-8.el7.x86_64
- file-libs-5.11-31.el7.x86_64
- filesystem-3.2-20.el7.x86_64
- findutils-1:4.5.11-5.el7.x86_64
- gawk-4.0.2-4.el7.x86_64
- gdbm-1.10-8.el7.x86_64
- glib2-2.42.2-5.el7.x86_64
- glibc-2.17-105.el7.x86_64
- glibc-common-2.17-105.el7.x86_64
- gmp-1:6.0.0-11.el7.x86_64
- gnupg2-2.0.22-3.el7.x86_64
- gpgme-1.3.2-5.el7.x86_64
- grep-2.20-2.el7.x86_64
- gzip-1.5-8.el7.x86_64
- hardlink-1:1.0-19.el7.x86_64
- hostname-3.13-3.el7.x86_64
- info-5.1-4.el7.x86_64
- initscripts-9.49.30-1.el7.x86_64
- iproute-3.10.0-54.el7.x86_64
- iptables-1.4.21-16.el7.x86_64
- iputils-20121221-7.el7.x86_64
- keyutils-libs-1.5.8-3.el7.x86_64
- kmod-20-5.el7.x86_64
- kmod-libs-20-5.el7.x86_64
- kpartx-0.4.9-85.el7.x86_64
- krb5-libs-1.13.2-10.el7.x86_64
- libacl-2.2.51-12.el7.x86_64
- libassuan-2.1.0-3.el7.x86_64
- libattr-2.4.46-12.el7.x86_64
- libblkid-2.23.2-26.el7.x86_64
- libcap-2.22-8.el7.x86_64
- libcap-ng-0.7.5-4.el7.x86_64
- libcom_err-1.42.9-7.el7.x86_64
- libcurl-7.29.0-25.el7.centos.x86_64
- libdb-5.3.21-19.el7.x86_64
- libdb-utils-5.3.21-19.el7.x86_64
- libffi-3.0.13-16.el7.x86_64
- libgcc-4.8.5-4.el7.x86_64
- libgcrypt-1.5.3-12.el7_1.1.x86_64
- libgpg-error-1.12-3.el7.x86_64
- libidn-1.28-4.el7.x86_64
- libmnl-1.0.3-7.el7.x86_64
- libmount-2.23.2-26.el7.x86_64
- libnetfilter_conntrack-1.0.4-2.el7.x86_64
- libnfnetlink-1.0.1-4.el7.x86_64
- libpwquality-1.2.3-4.el7.x86_64
- libselinux-2.5-11.el7.x86_64
- libsemanage-2.5-8.el7.x86_64
- libsepol-2.5-6.el7.x86_64
- libssh2-1.4.3-10.el7.x86_64
- libstdc++-4.8.5-4.el7.x86_64
- libtasn1-3.8-2.el7.x86_64
- libuser-0.60-7.el7_1.x86_64
- libutempter-1.1.6-4.el7.x86_64
- libuuid-2.23.2-26.el7.x86_64
- libverto-0.2.5-4.el7.x86_64
- libxml2-2.9.1-5.el7_1.2.x86_64
- lua-5.1.4-14.el7.x86_64
- ncurses-5.9-13.20130511.el7.x86_64
- ncurses-base-5.9-13.20130511.el7.noarch
- ncurses-libs-5.9-13.20130511.el7.x86_64
- nspr-4.10.8-2.el7_1.x86_64
- nss-3.19.1-18.el7.x86_64
- nss-softokn-3.16.2.3-13.el7_1.x86_64
- nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64
- nss-sysinit-3.19.1-18.el7.x86_64
- nss-tools-3.19.1-18.el7.x86_64
- nss-util-3.19.1-4.el7_1.x86_64
- openldap-2.4.40-8.el7.x86_64
- openssl-libs-1:1.0.1e-42.el7.9.x86_64
- p11-kit-0.20.7-3.el7.x86_64
- p11-kit-trust-0.20.7-3.el7.x86_64
- pam-1.1.8-12.el7_1.1.x86_64
- pcre-8.32-15.el7.x86_64
- pinentry-0.8.1-14.el7.x86_64
- pkgconfig-1:0.27.1-4.el7.x86_64
- popt-1.13-16.el7.x86_64
- procps-ng-3.3.10-3.el7.x86_64
- pth-2.0.7-23.el7.x86_64
- pygpgme-0.3-9.el7.x86_64
- pyliblzma-0.5.3-11.el7.x86_64
- python-2.7.5-34.el7.x86_64
- python-iniparse-0.4-9.el7.noarch
- python-libs-2.7.5-34.el7.x86_64
- python-pycurl-7.19.0-17.el7.x86_64
- python-urlgrabber-3.10-7.el7.noarch
- pyxattr-0.5.1-5.el7.x86_64
- qrencode-libs-3.4.1-3.el7.x86_64
- readline-6.2-9.el7.x86_64
- rpm-4.11.3centos7使用supermin制作centos7 Postgresql的docker镜像包
docker镜像制作案例——关于kafka-eagle-2.0.8(EFAK)版本的kafka管理工具实现镜像制作及发布