docker-compose.yml
version: '3'
services:
test:
image: osrf/ros:noetic-desktop-full
container_name: test-container
privileged: true
network_mode: "host"
# ports:
# - "80:80"
entrypoint: sh -c "while true; do echo '任務(wù)執(zhí)行于 $(date)'; sleep 5; done"
# command: ["/bin/bash"]
use
cd /path/to/yml
docker compose up -d
docker compose down