使用docker获取rancher
[root@localhost /]# docker pull rancher/server:stable [root@localhost /]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/hongdada/docker-centos latest bd4403c66e5e 11 hours ago 595 MB docker.io/nginx latest 5699ececb21c 9 days ago 109 MB docker.io/ubuntu 16.04 5e8b97a2a082 4 weeks ago 114 MB docker.io/rancher/server stable 85b3b338d0be 4 weeks ago 1.08 GB docker.io/tomcat latest 33e02377a00f 2 months ago 554 MB docker.io/centos 7.2.1511 0a2bad7da9b5 8 months ago 195 MB
可以看出rancher体积还是比较大的,有1个G
安装:
[root@localhost /]# docker run -d --restart=unless-stopped -p 8888:8080 rancher/server:stable 405098f5d97988758134da5d3f5c755c8745838a15777034721eed72c94d6a02 [root@localhost /]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 405098f5d979 rancher/server:stable "/usr/bin/entry /u..." 7 seconds ago Up 4 seconds 3306/tcp, 0.0.0.0:8888->8080/tcp relaxed_wescoff
参考:
https://rancher.com/docs/rancher/v1.6/zh/installing-rancher/installing-server/#single-container