1. 搜索cpolar镜像,输入命令:
docker search cpolar
Bash
2. 在出现的列表中,选择第二个:probezy/cpolar下载,输入命令:
docker pull probezy/cpolar
Bash
3. 下载好后,在本地镜像库即可看到,输入:
docker images
Bash
4. 运行容器和cpolar镜像
docker run -id --network host --name cpolar probezy/cpolar
Bash
5. 进入容器,输入命令:
docker exec -it cpolar /bin/bash
Bash
6. 添加cpolar authtoken,打开cpolar官网,复制Authtoken
7. 验证authtoken,访问cpolar官网并登录,然后点击左侧的验证,可以查看到你的token码
cpolar authtoken 复制的token
Bash
其中:/usr/local/etc/cpolar/cpolar.yml 是cpolar配置文件路径!
8. 测试暴露8081端口测试,输入:
cpolar http 8081
Bash
出现以下信息表示成功
这篇文章有一个评论
端口9200与现有的端口冲突,不想改变现有的9200端口,就手动在容器设置里把9200端口修改成19200,启动容器后,这个修改设置一直无法成功