拉取镜像
$ docker search portainer
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
portainer/portainer Making Docker management easy. https://porta… 1097
hypriot/rpi-portainer A web interface for the Docker engine. Dead … 42
portainer/agent An agent used to manage all the resources in… 27
portainer/templates App Templates for Portainer http://portainer… 13
portainer/golang-builder Utility to build Golang binaries. 3 [OK]
lihaixin/portainer docker ui 3 [OK]
portainerci/portainer Portainer images automatically created via P… 2
hassioaddons/portainer 1
softonic/portainer-endpoint Allows auto register all the swarm nodes in … 1 [OK]
stefanscherer/portainer Portainer for Windows 1809 and some older In… 1
voltha/voltha-portainer Portainer support for VOLTHA 0
拉取镜像
$ docker pull portainer/portainer
创建数据卷
$ docker volume create portainer_data
创建数据卷
$ docker run -d -p 30000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --name portainer portainer/portainer
参数说明:
-d:容器在后台运行;
-p 30000:9000 :宿主机30000端口映射容器中的9000端口
-v /var/run/docker.sock:/var/run/docker.sock :把宿主机的Docker守护进程(Docker daemon)默认监听的Unix域套接字挂载到容器中;
-v portainer_data:/data :把宿主机portainer_data数据卷挂载到容器/data目录