部署教程
mkdir agentgateway-config
docker run \
--user "$(id -u):$(id -g)" \
-v "$PWD/agentgateway-config:/config" \
-p 3000:3000 -p 4000:4000 -p 127.0.0.1:15000:15000 \
ghcr.io/agentgateway/agentgateway:latest
若直接使用官方的教程,可能会报错(权限不足):
Error: /config exists but is not writable; make it writable, pass --file, or pass --config
由于环境是 Fedora 44,启用的是 SELinux。故可能需要将文件夹 agentgateway-config 的权限修改为 777。
或
docker run \
--user "0:0" \
-v "$PWD/agentgateway-config:/config" \
-p 3000:3000 -p 4000:4000 \
ghcr.io/agentgateway/agentgateway:latest
services:
agentgateway:
container_name: agentgateway
env_file:
- path: ./.env
required: false
hostname: agentgateway
image: ghcr.io/agentgateway/agentgateway:latest
user: 0:0
ports:
- "3000:3000"
- "4000:4000"
volumes:
- ./data:/config
restart: unless-stopped