- 安装docker
- 当前用户(非root用户)管理docker
- docker下安装软件
- 登录portrainer
sudo usermod -aG docker username (将当前用户添加到docker组) newgrp docker groups docker run hello-world 检查是否可以运行docker命令
可能会用到的其它命令:
sudo systemctl is-active docker sudo systemctl is-enabled docker sudo systemctl status docker docker search ubuntu(docker下搜索各种镜像)
查看docker可使用的命令可在命令行输入:docker
docker下安装软件docker pull nginx:latest docker pull postgres:latest docker pull beginor/gitlab-ce:latest docker pull portainer/portainer:latest docker images (查看安装的镜像)
# 启动单机版portainer
docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name prtainer-test docker.io/portainer/portainer
使用9000端口,若端口被占用,改用其它端口,查看指定端口号的进程情况:
netstat -tunlp | grep 端口号登录portrainer
访问http://192.168.190.138:9000/,IP地址为设备PC地址,9000为自行设置的端口号,登陆后可看到以下界面:



