Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing in clean new project on code spaces #2

Closed
jason-johnson opened this issue Jan 23, 2023 · 4 comments
Closed

Failing in clean new project on code spaces #2

jason-johnson opened this issue Jan 23, 2023 · 4 comments

Comments

@jason-johnson
Copy link

.devcontainer

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
"features": {
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {},
"devwasm.azurecr.io/dev-wasm/dev-wasm-feature/rust-wasi:0": {}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"[azure-pipelines]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"eamodio.gitlens",
"davidanson.vscode-markdownlint",
"hashicorp.terraform",
"ms-azuretools.vscode-docker",
"ms-vscode.azurecli",
"ms-azuretools.vscode-azureterraform",
"ms-azuretools.vscode-azurefunctions",
"ms-azure-devops.azure-pipelines",
"esbenp.prettier-vscode",
"rust-lang.rust",
"bungcip.better-toml",
"vadimcn.vscode-lldb",
"loiane.ts-extension-pack",
"dbaeumer.vscode-eslint"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

Creation log

================================================================================
2023-01-23 09:21:58.741Z: Configuration starting...
2023-01-23 09:21:58.750Z: Cloning...

=================================================================================
2023-01-23 09:21:58.782Z: Creating container...
2023-01-23 09:21:58.786Z: Cleaning up docker images...
2023-01-23 09:21:59.263Z: $ devcontainer up --id-label Type=codespaces --workspace-folder /var/lib/docker/codespacemount/workspace/wargames --mount type=bind,source=/.codespaces/agent/mount/cache,target=/vscode --user-data-folder /var/lib/docker/codespacemount/.persistedshare --container-data-folder .vscode-remote/data/Machine --container-system-data-folder /var/vscode-remote --log-level trace --log-format json --update-remote-user-uid-default never --mount-workspace-git-root false --skip-non-blocking-commands --skip-post-create --remove-existing-container --config "/var/lib/docker/codespacemount/workspace/wargames/.devcontainer/devcontainer.json" --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell
2023-01-23 09:21:59.508Z: @devcontainers/cli 0.26.0. Node.js v14.21.1. linux 5.4.0-1098-azure x64.
2023-01-23 09:22:01.594Z: {"outcome":"error","message":"Failed to process feature devwasm.azurecr.io/dev-wasm/dev-wasm-feature/rust-wasi:0","description":"An error occurred setting up the container."}
2023-01-23 09:22:01.602Z: Error: Failed to process feature devwasm.azurecr.io/dev-wasm/dev-wasm-feature/rust-wasi:0
2023-01-23 09:22:01.606Z: at one (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1777:3059)
2023-01-23 09:22:01.619Z: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-01-23 09:22:01.631Z: at async nm (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1777:2227)
2023-01-23 09:22:01.638Z: at async Mf (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1779:1383)
2023-01-23 09:22:01.642Z: at async am (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1779:308)
2023-01-23 09:22:01.647Z: at async EF (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1865:2001)
2023-01-23 09:22:01.650Z: at async x7 (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1865:901)
2023-01-23 09:22:01.657Z: at async oie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1871:2093)
2023-01-23 09:22:01.664Z: at async qf (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1871:3239)
2023-01-23 09:22:01.669Z: at async Mse (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1995:16211)
2023-01-23 09:22:01.676Z: devcontainer process exited with exit code 1

====================================== ERROR ====================================
2023-01-23 09:22:01.685Z: Failed to create container.

2023-01-23 09:22:01.693Z: Error: Failed to process feature devwasm.azurecr.io/dev-wasm/dev-wasm-feature/rust-wasi:0
2023-01-23 09:22:01.700Z: Error Code: 1302

@jason-johnson
Copy link
Author

Also fails with the following .devcontainer file

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:0-1-bullseye",
"features": {
"devwasm.azurecr.io/dev-wasm/dev-wasm-feature/rust-wasi:0": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"

}

@jason-johnson
Copy link
Author

Ok, looking at this closer, it seems the problem is probably that there are no packages here. If I compare to, e.g. shell history, they have a package and the link in the .devcontainer file points to it.

@brendandburns
Copy link
Contributor

The problem is actually that the 0.26.0 devcontainers CLI doesn't support the Azure container registry this is fixed here:

devcontainers/cli#341

We need codespaces to pick up the new build.

@brendandburns
Copy link
Contributor

I have validated that this is now building in the current codespaces environment. Please let me know if you run into any further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants