1、拉取镜像
docker pull portainer/portainer:latest
2、 安装并启动一个portainer容器
docker run
-d --name portainer
-p 9000:9000
-v /var/run/docker.sock:/var/run/docker.sock
--restart always
--privileged=true portainer/portainer
3、进入界面 ,http://ip:9000进入,一来先给admin用户创建密码,然后本地启动
注:# 选择local时,下面会提示如下:说明需要再启动时,添加 -v "/var/run/docker.sock:/var/run/docker.sock",在前面启动语句中就有。
Manage the Docker environment where Portainer is running using the Unix filesystem socket.
Ensure that you have started the Portainer container with the following Docker flag: -v "/var/run/docker.sock:/var/run/docker.sock".
4、点击connect按钮直接进入主页,点docker,再点容器,就能看到你下载的了