version: '3.5' services: yancheng-edge: container_name: yancheng-edge image: yancheng-edge:debug dns: - 8.8.8.8 - 8.8.4.4 build: context: ./ dockerfile: ./Dockerfile environment: TZ: Asia/Shanghai privileged: true volumes: - ${project_dir}:${project_dir} - /dev:/dev network_mode: host # 关键:使用宿主机网络 working_dir: ${project_dir} command: bash run.sh restart: always