学习Portainer(可视化容器管理)

  1. 安装Portainer
    Portainer的安装非常简单,将花费不到一分钟的时间。

查看镜像:
安装Docker之后,运行以下命令以获取最新的Portainer映像。

[root@localhost ~]# docker search portainer

拉取镜像:

[root@localhost ~]# docker pull portainer/portainer
Using default tag: latest
latest: Pulling from portainer/portainer
d1e017099d17: Pull complete 
292b789be2e4: Pull complete 
Digest: sha256:63eb47d4b408c3f39e942368bcbf7e157a2b6e5dda94ffd403a14199e1137133
Status: Downloaded newer image for portainer/portainer:latest
docker.io/portainer/portainer:latest

查看镜像:

[root@zhao ~]# docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
portainer/portainer   latest              62771b0b9b09        5 weeks ago         79.1MB
django                south               5f790fca2056        6 weeks ago         524MB
<none>                <none>              7f5b3711f760        6 weeks ago         524MB
nginx                 latest              0901fa9da894        7 weeks ago         132MB
centos                7                   b5b4d78bc90c        3 months ago        203MB
django                latest              eb40dcf64078        3 years ago         436MB
  1. 启动
[root@localhost ~]# docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name prtainer-test portainer/portainer

该语句用宿主机9000端口关联容器中的9000端口,并给容器起名为portainer-test。执行完该命令之后,使用该机器IP:PORT即可访问Portainer。


image.png
  1. 访问
    阿里云公网IP:9000端口
    这里要注意在阿里云安全组开放端口

首次登陆需要注册用户,给管理员用户admin设置密码。


image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。