{
    "build": {
        "dockerfile": "Dockerfile"
    },
    "remoteUser": "user",
    "mounts": [
        // persist command history across sessions
        "source=commandhistory,target=/commandhistory,type=volume"
    ],
    "customizations": {
        "vscode": {
            "extensions": [
                "nordic-semiconductor.nrf-connect-extension-pack"
            ]
        }
    },
    "runArgs": [
        // Allow the container to use usb devices
        "--privileged",
        // This is a volume instead of a bind mount because the /dev/bus/usb directory doesn't
        // exist on the host if there's no usb device connected to the host and the bind mount
        // expects the directory to exist on the host, causing an error when trying to use the dev
        // container without any connected usb devices.
        // Binding the path as a volume fixes this, because the directory on the host will simply
        // be created if it doesn't exist.
        "--volume=/dev/bus/usb:/dev/bus/usb"
    ]
}
