2017年06月04日 16:07:32git
閱讀數:3164docker
supermin5 一個工具,運行命令man supermin能夠查看關於這個工具的基本信息。bootstrap
NAME
centos
supermin - Tool for creating supermin appliances
bash
SYNOPSIS
app
supermin [-o OUTPUTDIR] --names LIST OF PKGS ...
ide
supermin [-o OUTPUTDIR] PKG FILE NAMES ...
工具
DESCRIPTION
ui
Supermin is a tool for building supermin appliances. These are tiny appliances (similar to virtual machines), usually
this
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
版權聲明:本文爲博主原創文章,未經博主容許不得轉載。 https://blog.csdn.net/hjh00/article/details/72859287