When I try docker-compose.yml, it fail, and I don’t see what’s the problem in my docker-compose.yml:
version: ‘3’
services:
netdata:
image: netdata/netdata
container_name: netdata
hostname: example.com # set to fqdn of host
ports:
- 19999:19999
restart: unless-stopped
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
volumes:
- netdataconfig:/etc/netdata
- netdatalib:/var/lib/netdata
- netdatacache:/var/cache/netdata
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
environment:
- NETDATA_CLAIM_TOKEN=
- NETDATA_CLAIM_URL=https://app.netdata.cloud
- NETDATA_CLAIM_ROOMS=
volumes:
netdataconfig:
netdatalib:
netdatacache:
The output is:
ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
services.netdata.volumes contains an invalid type, it should be an array
It’s exactly took from netdata add node assistant.
docker run command works just fine but docker-compose doesn’t.
Any help, it will be apreciated.
Thanks,
Jorge