好物优选点击查看详情 京东购买

暂无内容

群晖DSM7.2安装docker管理工具portainer

获取portainer镜像

docker pull portainer/portainer:1.24.2 

创建挂在的文件夹

进入/volume1/docker/文件夹创建portainer所需文件夹

cxloge@synocxloge:~$ cd /volume1/docker/ cxloge@synocxloge:/volume1/docker$ mkdir -p portainer/1.24.2/data 

docker-cli.sh

sudo -i # 切换到root权限 docker run -d \ --restart=always \ --name=portainer-9000 \ -p 9000:9000 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(pwd)/data:/data \ portainer/portainer:1.24.2 

docker-compose.yml

cat >> docker-compose.yml<<EOF version: '3.1' services: portainer: image: portainer/portainer:1.24.2 container_name: portainer-9000 restart: always volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "./data:/data" ports: - "9000:9000" EOF 

根据已编排好的docker-compose.yml启动容器docker-compose up -d

root@synocxloge:/volume1/docker/portainer/1.24.2# ls data docker-compose.yml root@synocxloge:/volume1/docker/portainer/1.24.2# docker-compose up -d [+] Running 1/1 ⠿ Container portainer-9000 Started 5.9s root@synocxloge:/volume1/docker/portainer/1.24.2# docker ps | grep portainer 3bad9253ff2e portainer/portainer:1.24.2 "/portainer" 36 seconds ago Up 30 seconds 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp portainer-9000 

使用

http://192.168.31.37:9000/#/init/admin

群晖DSM7.2安装docker管理工具portainer插图

The password must be at least 8 characters long

群晖DSM7.2安装docker管理工具portainer插图1

Information Manage the Docker environment where Portainer is running. Ensure that you have started the Portainer container with the following Docker flag: -v "/var/run/docker.sock:/var/run/docker.sock" (Linux). or -v \\.\pipe\docker_engine:\\.\pipe\docker_engine (Windows). 

群晖DSM7.2安装docker管理工具portainer插图2

参考资料

群晖DSM系统docker管理工具:portainer的安装教程和汉化及portainer常用模块功能
https://mp.weixin.qq.com/s/XTnTFuG3X3ikmSSA86L7FA

原文链接:https://www.cnblogs.com/cxloge/p/17538723.html

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享