Download the following rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/
docker-io-1.4.1-3.el6.x86_64.rpm
lua-lxc-1.0.7-1.el6.x86_64.rpm
lua-alt-getopt-0.7.0-1.el6.noarch.rpm
lxc-1.0.7-1.el6.x86_64.rpm
lua-filesystem-1.4.2-1.el6.x86_64.rpm
lxc-libs-1.0.7-1.el6.x86_64.rpm
# rpm -Uvh *.rpm
warning: docker-io-1.4.1-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:lxc-libs ########################################### [ 17%]
2:lua-filesystem ########################################### [ 33%]
3:lua-lxc ########################################### [ 50%]
4:lua-alt-getopt ########################################### [ 67%]
5:lxc ########################################### [ 83%]
6:docker-io ########################################### [100%]
# chkconfig --list docker
docker 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
https://access.redhat.com/articles/881893
http://developerblog.redhat.com/2014/05/15/practical-introduction-to-docker-containers/
Docker has an official CentOS 6 repository which they support:
Download the docker image zip file manually
# cat centos-7-20150304_1234-docker.tar.xz | docker import - centos7:base
f4f6169a4b1175b2ed2f9c9f95369f8eec04b28c41b946280f45205e58bc7c05
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos7 base f4f6169a4b11 14 seconds ago 210 MB
Create docker image from my own system
- Create the tar files for your file system, simply could be
tar --numeric-owner --exclude=/proc --exclude=/sys -cvf centos6-base.tar /
- Transfer the tar file to other docker system if not installed locally and
import
it
cat centos6-base.tar | docker import - centos6-base
- Now you can verify by running it.
docker run -i -t centos6-base cat /etc/redhat-release
tar --numeric-owner --exclude=/proc --exclude=/sys --exclude=/root \
--exclude=/var --exclude=/home --exclude=/docker --exclude=/tmp \
-cvf centos6-base.tar /
cat centos6-base.tar | docker import - centos6-base 500e53a55f35cb64724a544b6b94d2db9629f9910564a3611ab106b78b7fd62f
docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos6-base latest 500e53a55f35 53 seconds ago 2.621 GB
No comments:
Post a Comment