How do I get dev containers to work?

Most of my projects / code use VS Code Dev containers, and I’m not able to successfully build and open in these containers… wondering what’s the workaround?

For example, getting this error when the devcontainer is being built…

failed to solve: dev_container_feature_content_temp: failed to resolve source metadata for docker.io/library/dev_container_feature_content_temp:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
[2024-04-23T16:29:22.142Z] Stop (2150 ms): Run: docker-compose --project-name #redacted# -f /Users/#redacted#/code/#redacted#/docker-compose.yml -f /Users/#redacted#/code/#redacted#/.devcontainer/docker-compose.dev.yml -f /Users/#redacted#/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1713889759992.yml build
[2024-04-23T16:29:22.143Z] Error: Command failed: docker-compose --project-name #redacted# -f /Users/#redacted#/code/#redacted#/docker-compose.yml -f /Users/#redacted#/code/#redacted#/.devcontainer/docker-compose.dev.yml -f /Users/#redacted#/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1713889759992.yml build
[2024-04-23T16:29:22.143Z]     at pw (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:427:522)
[2024-04-23T16:29:22.143Z]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-04-23T16:29:22.143Z]     at async L$ (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:427:2493)
[2024-04-23T16:29:22.143Z]     at async N$ (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:409:3165)
[2024-04-23T16:29:22.143Z]     at async tAA (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:479:3833)
[2024-04-23T16:29:22.143Z]     at async CC (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:479:4775)
[2024-04-23T16:29:22.143Z]     at async NeA (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:612:11107)
[2024-04-23T16:29:22.143Z]     at async MeA (/Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:612:10848)
[2024-04-23T16:29:22.147Z] Stop (6552 ms): Run: /Applications/Cursor.app/Contents/Frameworks/Cursor Helper (Plugin).app/Contents/MacOS/Cursor Helper (Plugin) /Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/#redacted#/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-b754c523-9178-478d-933d-b7c45eb640e11713889754028 --workspace-folder /Users/#redacted#/code/#redacted# --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/#redacted#/code/#redacted# --id-label devcontainer.config_file=/Users/#redacted#/code/#redacted#/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/#redacted#/code/#redacted#/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[2024-04-23T16:29:22.147Z] Exit code 1
[2024-04-23T16:29:22.149Z] Command failed: /Applications/Cursor.app/Contents/Frameworks/Cursor Helper (Plugin).app/Contents/MacOS/Cursor Helper (Plugin) /Users/#redacted#/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/#redacted#/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-b754c523-9178-478d-933d-b7c45eb640e11713889754028 --workspace-folder /Users/#redacted#/code/#redacted# --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/#redacted#/code/#redacted# --id-label devcontainer.config_file=/Users/#redacted#/code/#redacted#/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/#redacted#/code/#redacted#/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[2024-04-23T16:29:22.149Z] Exit code 1

@amanrs has the best context here. I will bring him to look into it :slight_smile:

Any updates here?

Is there any chance something from this thread solves it:

hmm, honestly, I am finding that thread very hard to follow - not an expert here. I have no trouble running dev containers in VS Code on the very same device, it’s just it doesn’t work with Cursor - if that helps.

Sorry, I’m not sure what is meant here? My original issue above is that the dev container is not even getting built… it’s failing (as shown in the logs above). So there’s no way for me to connect and delete anything inside of it, for a container that isn’t even running yet?

Could you share the details on your machine.

I would copy/paste from the menu “Cursor > About Cursor”

I had switched back to VS code a while back due to this issue, so I Just reinstalled Cursor right now to the latest version, and tried building and opening the project in dev container. Still breaking:

Version: 0.33.4
VSCode Version: 1.86.2
Commit: 2dd5b2855ac68f3a3d3babee87d22b399a9db7d0
Date: 2024-05-11T02:05:08.197Z
Electron: 27.2.3
ElectronBuildId: undefined
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.4.0

and here’s some logs of the build container step failing

------
 > [devcontainer internal] load metadata for docker.io/library/dev_container_feature_content_temp:latest:
------
failed to solve: dev_container_feature_content_temp: failed to resolve source metadata for docker.io/library/dev_container_feature_content_temp:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
[2024-05-17T19:50:58.597Z] Stop (1000 ms): Run: docker-compose --project-name ##redacted## -f /Users/##redacted##/code/##redacted##/docker-compose.yml -f /Users/##redacted##/code/##redacted##/.devcontainer/docker-compose.dev.yml -f /Users/##redacted##/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1715975457596.yml build
[2024-05-17T19:50:58.597Z] Error: Command failed: docker-compose --project-name ##redacted## -f /Users/##redacted##/code/##redacted##/docker-compose.yml -f /Users/##redacted##/code/##redacted##/.devcontainer/docker-compose.dev.yml -f /Users/##redacted##/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1715975457596.yml build
[2024-05-17T19:50:58.598Z]     at pw (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:427:522)
[2024-05-17T19:50:58.598Z]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-05-17T19:50:58.598Z]     at async L$ (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:427:2493)
[2024-05-17T19:50:58.598Z]     at async N$ (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:409:3165)
[2024-05-17T19:50:58.598Z]     at async tAA (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:479:3833)
[2024-05-17T19:50:58.598Z]     at async CC (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:479:4775)
[2024-05-17T19:50:58.598Z]     at async NeA (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:612:11107)
[2024-05-17T19:50:58.598Z]     at async MeA (/Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js:612:10848)
[2024-05-17T19:50:58.604Z] Stop (3710 ms): Run: /Applications/Cursor.app/Contents/Frameworks/Cursor Helper (Plugin).app/Contents/MacOS/Cursor Helper (Plugin) /Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/##redacted##/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-788d52f0-3e0b-4655-a49f-ac3d9729eadb1715975453227 --workspace-folder /Users/##redacted##/code/##redacted## --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/##redacted##/code/##redacted## --id-label devcontainer.config_file=/Users/##redacted##/code/##redacted##/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/##redacted##/code/##redacted##/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[2024-05-17T19:50:58.604Z] Exit code 1
[2024-05-17T19:50:58.607Z] Command failed: /Applications/Cursor.app/Contents/Frameworks/Cursor Helper (Plugin).app/Contents/MacOS/Cursor Helper (Plugin) /Users/##redacted##/.cursor/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/##redacted##/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-788d52f0-3e0b-4655-a49f-ac3d9729eadb1715975453227 --workspace-folder /Users/##redacted##/code/##redacted## --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/##redacted##/code/##redacted## --id-label devcontainer.config_file=/Users/##redacted##/code/##redacted##/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/##redacted##/code/##redacted##/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[2024-05-17T19:50:58.607Z] Exit code 1

Screen Shot 2024-05-17 at 6.21.42 PM

Can you copy/paste About Cursor details

And between opening Cursor and getting to that error, exactly what steps do you take?

hey

  • I thought I copy/pasted the About cursor details in my previous response? attaching img here too

  • what exact steps to getting to that error?

I open my project/workspace in Cursor, and then run the Dev Containers: Rebuild and Reopen in Container option

Hey @amanrs - wondering if the information I provided above is useful and any luck on this front? really can’t wait for Cursor to have dev containers support! :slight_smile: