docker search portainer 安装portainer容器管理端
对于很多linux操作,使用命令行总是有些不方便,docker有不少管理端。比如:
可视化图形工具Portainer
Portainer介绍
Portainer是一个可视化的容器镜像的图形管理工具,利用Portainer可以轻松构建,管理和维护Docker环境。 而且完全免费,基于容器化的安装方式,方便高效部署。
官方站点:`https://www.portainer.io/`
安装Portainer
官方安装说明:`https://docs.portainer.io/start/install`
### 步骤
查询当前有哪些Portainer镜像可用
`docker search portainer`
!(data/attachment/forum/202210/09/113544a8b31zgs88bk9otk.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
见上图就是查询出来的有下载量的 portainer 镜像,我们下载下载了最多的一个:`docker.io/portainer/portainer` 即可。
使用以下命令可下载镜像
下载镜像
`docker pull docker.io/portainer/portainer`
!(data/attachment/forum/202210/09/113629j8ka5odgt9ixoazv.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
```html
docker run -d \
--name prtainer \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
--privileged=true \
--restart=always \
docker.io/portainer/portainer
```
!(data/attachment/forum/202210/09/113724u2ycjynemncyepza.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
命令说明:
name prtainer : 设置容器名称为 prtainer
p 9000:9000 : 设置端口映射为 9000,通过服务器ip + 端口可访问docker容器
-v :设置变量,此处设置存储路径
restart=always :设置为开机自启
直接IP+端口号 访问 首次需要初始化密码
!(data/attachment/forum/202210/09/113742zlt6lp9is9sjn9tj.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
!(data/attachment/forum/202210/09/113749aoeecjbg9nfz6m1j.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
提示升级
You are currently using version 1.x of Portainer, which is no longer supported maintained or enhanced. Continuing to use this version is at your own risk.
Please upgrade immediately by using the tagportainer/portainer-ce:2.0.1
If you decide to stay on version 1, please use the tagportainer/portainer:1.24.2 to prevent automatically upgrading to version 2, asportainer:latest will be updated to version 2 from May.
#### 简单是就是提示你用另外的一个版本
**注意**,下面是简单粗暴的直接删除,安装,当升级的时候,是否需要保留原来的数据?原来是否有data挂载映射?届时考虑下
```bash
# docker stop prtainer
prtainer
# docker rm prtainer
prtainer
# docker rmi portainer/portainer
Untagged: portainer/portainer:latest
Untagged: portainer/portainer@sha256:25415d1143949e5dc0b03585365dc8bbe84f443ef116dc27719dc69f23ead35e
Deleted: sha256:12b0b8dced14a8516c15641d5630ae39c19bee390bfe3cc92b019437e784b1f5
Deleted: sha256:d29d937a1cd8df530e770c3c86a3a6cef34cd156d1f57c10c9f728215a9ac772
Deleted: sha256:e0a46f5d05e1b93a7993c45aaea39729d111d7a096e02ac1656c721e39cb5222
Deleted: sha256:8c004456aeb58b75f792fa091b194c20d6ed4f0d95dd25b0150d71c5c9ab601b
#
#
# docker pull portainer/portainer-ce
Using default tag: latest
latest: Pulling from portainer/portainer-ce
772227786281: Pull complete
96fd13befc87: Pull complete
dc6f8e90d5b4: Pull complete
0e84c6386ab3: Pull complete
Digest: sha256:52f9fdee1e4acfb1b5c4ddd15c88905287efb6e8f8058d2c5a2543ddc72e9dc0
Status: Downloaded newer image for portainer/portainer-ce:latest
docker.io/portainer/portainer-ce:latest
#
#
#
#
#
# docker run -d --name portainer -p 9000:9000 --privileged=true -v /var/run/docker.sock:/var/run/docker.sock -v /usr/local/docker/data/portainer/data:/data --restart=always portainer/portainer-ce
d68402a726055e90116a1b2df9826b07a4d6d8b96c1540809918a1c929c107d1
#
#
#
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d68402a72605 portainer/portainer-ce "/portainer" 5 seconds ago Up 4 seconds 8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp portainer
cce353099c41 redis:5.0 "docker-entrypoint.s…" 40 minutes ago Up 19 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis5.0
#
#
#
```
!(data/attachment/forum/202210/09/113952ngggp7oqk99puk7l.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
!(data/attachment/forum/202206/16/141330jha7st9soow8772i.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "common_log.png")
`转载务必注明出处:程序员潇然,疯狂的字节X,https://crazybytex.com/thread-196-1-1.html `
页:
[1]