赞
踩
17.06.0-ce
3.12
3.10.0-957.el7.x86_64
|| 5.10.2-1.el7.elrepo.x86_64
(Optional)CentOS Linux release 7.9.2009 (Core)
(Optional)实测在该环境下,容器热迁移可用,热迁移成功与否与
docker
和criu
版本强相关。
# Docker 安装 $ sudo yum install -y yum-utils $ sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo $ sudo yum list docker-ce --showduplicates | sort -r $ sudo yum install docker-ce-17.06.0.ce # 启动Docker实验特征 vim **/etc/docker/daemon.json + { "experimental": true } #** 启动docker并设置开机自启 ****$ sudo systemctl enable docker $ sudo systemctl start docker # criu 安装 $ sudo yum install criu -y # Go安装(可选) wget https://golang.org/dl/go1.15.6.linux-amd64.tar.gz tar -C /usr/local -xzf go1.15.6.linux-amd64.tar.gz vim /etc/profile + export PATH=$PATH:/usr/local/go/bin source /etc/profile
# On the host
$ docker run -d --name looper2 --security-opt seccomp:unconfined busybox \
/bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
# wait a few seconds to give the container an opportunity to print a few lines, then
$ docker checkpoint create looper2 checkpoint2
# check your container & print log file
$ docker logs looper2
# On the client
$ docker create --name looper-clone --security-opt seccomp:unconfined busybox \
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。