升级系统内核
yum update nss
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-lt -y
vim /etc/grub.conf 修改default 为0
reboot 重启
安装Docker1.7.1
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install docker-io -y
service docker start
chkconfig docker on
升级Docker至1.9.1
service docker stop
wget https://get.docker.com/builds/Linux/x86_64/docker-1.9.1
chmod +x docker-1.9.1
mv docker-1.9.1 /usr/bin/docker
docker -v
service docker start
创建自定义网络
docker network create --subnet=172.18.0.0/16 NET_18
导入tar镜像包
docker import redis_20180831.tar redis:20180831
或
cat redis_20180831.tar | docker import - redis:20180831
创建容器并运行
docker run -itd --name redis --ulimit nproc=65535 --ulimit nofile=65535 -v /proc/:/writable-proc/ --net NET_18 -p 192.168.10.11:6379:6379 redis:20180918 /bin/bash
-v 共享存储
-p 端口映射
评论区