supermin构建基于本机的系统的docker镜像

yum -y install supermin*

# 安装一些程序
supermin5 --prepare bash coreutils yum net-tools initscripts vim-minimal -o supermin.d

supermin5 --build --format chroot supermin.d -o appliance.d

# 打包.tar
tar --numeric-owner -cpf base.tar -C appliance.d .

# 上传镜像
cat base.tar |docker import - base:latest

# 运行容器
docker run -dit base:latest /bin/bash


猜你喜欢

转载自blog.csdn.net/fly1574/article/details/132623484