{
    "name": "ROS 2 Jazzy",
    "privileged": true,
    "remoteUser": "${localEnv:USER}",
    "build": {
        "context": "../..",
        "dockerfile": "Dockerfile.jazzy",
        "args": {
            "USERNAME": "${localEnv:USER}"
        }
    },
    "workspaceFolder": "/workspaces/agv_pro_ros2",
    "features": {
        "ghcr.io/devcontainers/features/docker-from-docker:1": {
            "version": "latest",
            "moby": true
        }
    },
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "anthropic.claude-code"
            ]
        }
    },
    "containerEnv": {
        "DISPLAY": ":0",
        "ROS_AUTOMATIC_DISCOVERY_RANGE": "SUBNET",
        "ROS_DOMAIN_ID": "0",
        "RMW_IMPLEMENTATION": "rmw_cyclonedds_cpp",
        "CYCLONEDDS_URI": "/workspaces/agv_pro_ros2/.devcontainer/cyclonedds.xml"
    },
    "runArgs": [
        // "--network=robot-sim",
        "--network=host",
        "--pid=host",
        "--ipc=host",
        "--group-add=dialout",
        "-e",
        "DISPLAY=${env:DISPLAY}"
    ],
    "mounts": [
        "source=/dev,target=/dev,type=bind",
        "source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
        "source=/usr/local/share/ca-certificates,target=/usr/local/share/host-certificates,type=bind,consistency=cached",
        "source=${localEnv:HOME}/.ssh,target=/home/${localEnv:USER}/.ssh,type=bind,consistency=cached"
    ],
    "postCreateCommand": "bash .devcontainer/post-create.sh"
}