centos6.5环境。
# yum install docker-io -y
会依赖安装libcgroup,lxc,lxc-libs
启动docker
# service docker start
Starting cgconfig service: [确定]
Starting docker: [确定]
获取最新的docker image
# docker pull centos:latest
运行image
# docker run -i -t centos /bin/bash
bash-4.2# ls
bin dev etc home lib lib64 lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
bash-4.2# exit
提交更新
# docker commit -m="add net-tools" -a="dbyin" ad6327a8e166 dbyin/testrep
15a31c1fd4dd1a514b8d771e456fd9adfe206a70e4a672057363322c8b918a3a
删除镜像
# docker rmi dbyin/sshd
Untagged: dbyin/sshd:latest
Deleted: 3e6ddcc38145770486dbd2fcb5b3a6734fea447ab024c540e83d34acc8113a11
Deleted: ab8ed0aaabab96eaf1656539bb0f7990f1b114197d39308e93ab1160c222d4ff
Deleted: 4ffa765d3fafa308edba9de3e59582451d6658e4c50cf9d107bc18bfe415d2e9
Deleted: 95cc1fd701f6961585196a0b43e06404aa81f4ec65278d2249ad0716a2cf3d87
Deleted: ae21b4f05d98ea18aff9c4ed33343c933f6f11c8adb5342ab7e1ded6af8c5fd8
主要参考
[1]https://docs.docker.com/installation/centos/