用supermin制作centos 7 docker 基础镜像
2017-06-04 16:07
746 查看
supermin5 一个工具,运行命令man supermin可以查看关于这个工具的基本信息。
步骤-1
步骤-2
步骤-3
步骤-4导入tar文件到docker
制作镜像时想包含某个命令,但又不知道在哪个包时,可以用yum whatprovides 来查找。
NAME supermin - Tool for creating supermin appliances SYNOPSIS supermin [-o OUTPUTDIR] --names LIST OF PKGS ... supermin [-o OUTPUTDIR] PKG FILE NAMES ... DESCRIPTION Supermin is a tool for building supermin appliances. These are tiny appliances (similar to virtual machines), usually around 100KB in size, which get fully instantiated on-the-fly in a fraction of a second when you need to boot one of them. Originally "fe" in "febootstrap" stood for "Fedora", but this tool is now distro-independent and can build supermin appliances for several popular Linux distros, and adding support for others is reasonably easy. For this reason, starting with version 4, we have renamed the tool "supermin". Note that this manual page documents supermin 4.x which is a complete rewrite and quite different from febootstrap 2.x. If you are looking for the febootstrap 2.x tools, then this is not the right place.运行命令supermin5 --help可以查看基本的使用方法
[root@centos7 ~]# supermin5 --help supermin - tool for creating supermin appliances Copyright (C) 2009-2014 Red Hat Inc. Usage: supermin --prepare LIST OF PACKAGES ... supermin --build INPUT [INPUT ...] For full instructions, read the supermin(1) man page. Options: --build Build a full appliance --copy-kernel Copy kernel instead of symlinking --dtb WILDCARD Find device tree matching wildcard -f chroot|ext2 Set output format --format -"- --host-cpu ARCH Set host CPU architecture --if-newer Only build if needed --include-packagelist Add a file with the list of packages --list-drivers Display list of drivers and exit --lock LOCKFILE Use a lock file --names Give an error for people needing supermin 4 -o OUTPUTDIR Set output directory --packager-config CONFIGFILE Set packager config file --prepare Prepare a supermin appliance --size Set the size of the ext2 filesystem --use-installed Use installed files instead of accessing network -v Enable debugging messages --verbose -"- -V Display version and exit --version -"- -help Display this list of options --help Display this list of options如果找不到该命令,用 yum install supermin* 安装。
步骤-1
supermin5 -v --prepare bash coreutils -o supermin.d
步骤-2
supermin5 -v --build --format chroot supermin.d -o appliance.d
步骤-3
echo 7.2 > appliance.d/etc/yum/vars/releasever tar --numeric-owner -cpf centos-7-2.tar -C appliance.d .
步骤-4导入tar文件到docker
cat centos-7-2.tar | docker import - oliver/centos:v7.2
制作镜像时想包含某个命令,但又不知道在哪个包时,可以用yum whatprovides 来查找。
[root@centos7 images]# yum whatprovides */ifconfig 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: centos.ustc.edu.cn * extras: mirrors.cn99.com * updates: mirrors.cn99.com net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools 源 :base 匹配来源: 文件名 :/sbin/ifconfig net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools 源 :installed 匹配来源: 文件名 :/sbin/ifconfig
相关文章推荐
- 制作Docker基础镜像------centos6.3
- 使用supermin制作CentOS的Docker镜像
- Docker 从零开始制作基础镜像[centos]
- 在centos7中使用supermin制作centos6.5docker镜像
- Docker 从零开始制作基础镜像[centos]
- 在Centos7 系统中使用supermin制作CentOS6 的Docker镜像
- Docker安装初试&&制作centos6.5基础镜像
- Docker 从零开始制作基础镜像[centos]
- Docker 从零开始制作基础镜像[centos]
- Docker 从零开始制作基础镜像[centos]
- [docker]centos7 supervisor镜像制作参考
- 转:如何制作一个定制的 PHP 基础 Docker 镜像(一)
- 一种docker基础镜像制作方法
- docker基础镜像制作
- 从零开始构建一个centos+jdk7+tomcat7的镜像文件 centos7系统下docker运行环境的搭建 准备centos基础镜像 docker pull centos 或者直接下载我准备
- 基于docker的centos:latest镜像制作nginx的镜像
- Centos环境制作Docker Tomcat镜像
- [docker]Centos7环境JAVA基础docker镜像构建
- 【docker】学习笔记一:制作自己的centos6.9镜像
- CentOS6 PHP5.6+Nginx Docker镜像制作