services: v2ray: image: v2fly/v2fly-core:latest container_name: v2ray-core restart: unless-stopped network_mode: "service:v2raya" volumes: - /opt/data/v2raya-extra:/etc/v2ray command: run -c /etc/v2ray/config.json v2raya: image: mzz2017/v2raya:latest container_name: v2raya restart: unless-stopped network_mode: host privileged: true volumes: - /opt/data/v2raya:/etc/v2raya - /opt/data/v2raya-extra:/etc/v2raya-extra environment: - V2RAYA_LOG_FILE=/tmp/v2raya.log - V2RAYA_V2RAY_BIN_PATH=/usr/local/bin/v2ray - V2RAYA_V2RAY_CONFDIR=/etc/v2raya-extra depends_on: - v2ray