问题如下:
按照很多教程配置好了 docker ,但是端口看着是启起来了,但是端口扫描 21115-21119 全是关闭状态,只有 api 的 21114 是开启状态,不清楚是什么问题。
废话不多说,直接上配置:
docker-compose.yml 内容
version: '3'
networks:
rustdesk-net:
external: false
services:
hbbs:
container_name: hbbs
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21118:21118
image: rustdesk/rustdesk-server:latest
command: hbbs -r [ myip ] :21117 -k _
volumes:
- ./data:/root
networks:
- rustdesk-net
depends_on:
- hbbr
restart: unless-stopped
hbbr:
container_name: hbbr
ports:
- 21117:21117
- 21119:21119
image: rustdesk/rustdesk-server:latest
command: hbbr -k _
volumes:
- ./data:/root
networks:
- rustdesk-net
restart: unless-stopped
rustdesk-api-server:
container_name: rustdesk-api-server
image: kingmo888/rustdesk-api-server:latest
environment:
- CSRF_TRUSTED_ORIGINS=http:// [ myip ] :21114 #防跨域信任来源,可选
- ID_SERVER= [ myip ] :21114 #Web 控制端使用的 ID 服务器
volumes:
- /opt/rustdesk/db:/rustdesk-api-server/db #修改为你宿主机数据库挂载目录
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# network_mode: bridge
networks:
- rustdesk-net
ports:
- "21114:21114"
restart: unless-stopped
防火墙是关闭状态,阿里云安全组:
下面是 docker 启动状态
查看端口状态:
下面是 docker-compose 的相关日志:
|