官网教程很简单,但一直无限重启,查了两晚终于搞掂了!
1)安装guacd
docker run --restart=always --name guacd -d -v /home/docker/nexterminal/data:/usr/local/next-terminal/data dushixiang/guacd:latest
2)使用 docker-compose.yaml 安装
services:
guacd:
container_name: guacd
image: guacamole/guacd:latest
volumes:
- ./data:/usr/local/next-terminal/data
restart: always
postgresql:
container_name: postgresql
image: postgres:16-alpine
environment:
POSTGRES_DB: next-terminal
POSTGRES_USER: next-terminal
POSTGRES_PASSWORD: next-terminal
volumes:
- ./data/postgresql:/var/lib/postgresql/data
restart: always
next-terminal:
container_name: next-terminal
image: registry.cn-beijing.aliyuncs.com/dushixiang/next-terminal:latest
ports:
- "8088:8088"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data:/usr/local/next-terminal/data
- ./logs:/usr/local/next-terminal/logs
- ./config.yaml:/etc/next-terminal/config.yaml
执行命令 docker-compose up -d
这里有个坑,安装完成后在安装目录中config.yaml会是以目录名存在,这是最大的坑,人手把config.yaml这个目录删除 rm -rf config.yaml
然后vi config.yaml 编辑一个新的文件,以下内容复制进去保存退出即可!
database: enabled: true type: postgres postgres: hostname: 192.168.x.x <---这里填上postgres数据库服务器的IP地址 port: 5432 username: next-terminal password: next-terminal database: next-terminal log: level: debug filename: ./logs/nt.log server: addr: "0.0.0.0:8088" tls: enabled: false auto: false cert: "" key: "" app: recording: type: "local" path: "/usr/local/next-terminal/data/recordings" guacd: drive: "/usr/local/next-terminal/data/drive" hosts: - hostname: 192.168.x.x <---这里填上guacd服务器的IP地址 port: 4822 weight: 1
3) 最后执行以下命令
docker run -d --restart always --name next-terminal --link guacd -p 8088:8088 -v /home/docker/nextterminal/data:/usr/local/next-terminal/data -v /etc/localtime:/etc/localtime -e DB=sqlite -e GUACD_HOSTNAME-guacd -e GUACD_PORT=4822 dushixiang/next-terminal:latest
