rancheros

Launching RancherOS using Docker Machine

Before moving forward, you’ll need to have Docker Machine and VirtualBox installed. Once you have VirtualBox and Docker Machine installed, it’s just one command to get RancherOS running.

1
2
3
4
docker-machine create -d virtualbox \
--virtualbox-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso \
--virtualbox-memory 2048 \
<MACHINE-NAME>

That’s it! You’re up and running a RancherOS instance.
To log into the instance, just use the docker-machine command.

ssh 登录

1
docker-machine ssh <MACHINE-NAME>

切换docker镜像

1
2
3
4
5
6
7
sudo ros c set  rancher.bootstrap_docker.registry_mirror  https://registry.docker-cn.com

sudo ros c set rancher.system_docker.registry_mirror https://registry.docker-cn.com

sudo ros c set rancher.docker.registry_mirror https://registry.docker-cn.com

sudo ros c set rancher.defaults.registry_mirror https://registry.docker-cn.com

重启已加载配置

1
sudo reboot

切换为Ubuntu

1
2
sudo ros console switch ubuntu
sudo ros engine switch docker-17.03.2-ce

替换源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse