- 隧道名称, 添加到环境变量中, 可自定义(暂时不需要了)
- 其他高级操作
cpolar.yml文件通过挂载的方式进行自定义(挂载配置文件即可)
- docker-compose.yml结合export命令使用, 这样token就不容易看到了
services:
cpolar-ssh:
image: registry.cn-hangzhou.aliyuncs.com/iuin/cpolar-ssh:latest
environment:
- TZ="Asia/Shanghai"
- CPOLAR_AUTH_TOKEN=${CPOLAR_AUTH_TOKEN}
- CPOLAR_CONTANER_SSH_NAME=contaner_ssh_1
restart: unless-stopped
privileged: true
export CPOLAR_AUTH_TOKEN=xxx
docker compose up -d
Host cpolar.internet.company
HostName 3.tcp.cpolar.top
User root
Port 11968
IdentityFile ~/.ssh/id_ed25519_1
ssh cpolar.internet.company