1)获取系统基础包
https://github.com/CentOS/sig-cloud-instance-images/tree/CentOS-7.2.1511/docker
2)生成dockerfile
cat Dockerfile7.2.base
FROM scratch
MAINTAINER The CentOS Project <cloud-ops@centos.org>
ADD centos-7.2.1511-docker.tar.xz /
LABEL name="CentOS Base Image"
LABEL vendor="CentOS"
LABEL license=GPLv2
# Volumes for systemd# VOLUME ["/run", "/tmp"]# Environment for systemd# ENV container=docker# For systemd usage this changes to /usr/sbin/init# Keeping it as /bin/bash for compatability with previous
CMD ["/bin/bash"]
3)生成镜像
docker build -t hub.ark.jcloud.com/zhaotao1/centos7.2 -f Dockerfile7.2.base .