1
0
mirror of https://github.com/rancher/os.git synced 2025-07-04 02:26:13 +00:00

Updated How to run multiple user docker daemons (markdown)

niusmallnan 2018-07-11 16:45:05 +08:00
parent aafdcc166f
commit a9fef18f6d

@ -40,7 +40,7 @@ UD still runs in the console container, OUD runs on system-docker. Each OUD is a
### Download ISO and install
You can download the ISO here.
You can download the ISO here. https://storage.googleapis.com/ros-images/rancheros-mud-1.iso
If you want to use it on AWS, you should boot a VM with RancherOS1.4 and upgrade to a new version:
@ -88,8 +88,11 @@ ros service list
disabled volume-efs
disabled volume-nfs
enabled dind1
```
To make the dind1 service running, you can use:
```
ros service up dind1
```
@ -99,6 +102,42 @@ After the OUD service is started, users can interact with it as if they were usi
docker-dind1 ps -a
```
### SSH into OUD container
User can specify an external ssh port with `--ssh-port`, and ssh keys with `--authorized-keys`. Both of them are optional.
```
ros engine create -h
...
...
OPTIONS:
--ssh-port value
--authorized-keys value
```
We will generate a random password for each OUD container, which users can see in the container logs. This password is useful when the users do not set the keys.
```
system-docker logs dind1
======================================
chpasswd: password for 'root' changed
password: xCrw6fEG
======================================
```
Users can ssh into any OUD container like this:
```
system-docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ca07a25799b cnrancher/docker:17.12.1-dind "docker-entrypoint..." 5 seconds ago Up 3 seconds 2375/tcp, 0.0.0.0:34791->22/tcp dind1
ssh -p 34791 root@<host-external-ip>
ssh root@<OUD-container-ip>
```
### Remove OUD
Just use `ros engine rm`:
@ -118,7 +157,7 @@ docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable
#### Run rancher/agent in OUD container
```
# exec into OUD container
# exec into OUD container, also ssh
system-docker exec -it dind1 /bin/sh
# Add an agent to this rancher-server
@ -132,7 +171,7 @@ As Rancher uses the overlay network by default, only one RancherOS host can be u
## Others
Please submit any bugs, issues for this feature to [rancher/os](https://github.com/rancher/os/issues), and adding this label `multiple-user-docker` would be very friendly.
Please submit any bugs, issues for this feature to [rancher/os](https://github.com/rancher/os/issues), and add this label `multiple-user-docker` would be very friendly.