栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

docker下安装并使用Protrainer

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

docker下安装并使用Protrainer

docker下安装并使用Protrainer
  • 安装docker
    • 当前用户(非root用户)管理docker
  • docker下安装软件
    • 登录portrainer

安装docker 当前用户(非root用户)管理docker
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为自行设置的端口号,登陆后可看到以下界面:

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/395660.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号