I have a docker-compose.yml that works very well, and I am using it on four hosts:
version: '3'
services:
  netdata:
    image: netdata/netdata
    container_name: netdata
    hostname: ${HOSTNAME}
    ports:
      - 19999:19999
    restart: unless-stopped
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined
    environment:
      - PGID=${PGID}
      - TZ=${TZ}
      - DO_NOT_TRACK=1
    volumes:
      - ${APPDATA}:/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
      - /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
  netdatalib:
  netdatacache:
According to the netdata docker documentation it is possible to adjust the configuration of agent containers by attaching to the bash shell of the running container.
Here’s what happens:
$ docker exec -it netdata bash
bash-5.1# cd /etc/netdata
bash-5.1# ./edit-config netdata.conf
bash: ./edit-config: No such file or directory
Am I missing something?