Comments (5)
I tried to open a dev container with the jekyll template and it was successful.
I wonder if the docker cache is interfering with the inspect?
from templates.
On my local-machine, I cleared my cache (both page and RAM) and ran into the same error. Because local-machines can be fickle, I used a codespace as well; however, I still ran into the error.
Here is the creation-log:
=================================================================================
2023-02-24 07:05:57.840Z: Configuration starting...
2023-02-24 07:05:57.849Z: Cloning...
=======================
==========================================================
2023-02-24 07:05:57.873Z: Creating container...
2023-02-24 07:05:57.875Z: Cleaning up docker images...
2023-02-24 07:05:58.331Z: $ devcontainer up --id-label Type=codespaces --workspace-folder /var/lib/docker/codespacemount/workspace/meg-io.github.io --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/meg-io.github.io/.devcontainer/devcontainer.json" --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell --container-session-data-folder /workspaces/.codespaces/.persistedshare/devcontainers-cli/cache
2023-02-24 07:05:58.543Z: @devcontainers/cli 0.28.0. Node.js v14.21.2. linux 5.4.0-1103-azure x64.
2023-02-24 07:05:58.705Z: Error: Command failed: docker inspect --type image mcr.microsoft.com/devcontainers/jekyll:0-${templateOption:imageVariant}
2023-02-24 07:05:58.707Z: at fie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1915:1355)
2023-02-24 07:05:58.708Z: at P7 (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1915:1291)
2023-02-24 07:05:58.710Z: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-02-24 07:05:58.712Z: at async Fie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1921:2093)
2023-02-24 07:05:58.715Z: at async $f (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1921:3239)
2023-02-24 07:05:58.717Z: at async eoe (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:2045:17247)
2023-02-24 07:05:58.719Z: at async Qse (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:2045:16993)
2023-02-24 07:05:58.722Z: {"outcome":"error","message":"Command failed: docker inspect --type image mcr.microsoft.com/devcontainers/jekyll:0-${templateOption:imageVariant}","description":"An error occurred setting up the container."}
2023-02-24 07:05:58.751Z: devcontainer process exited with exit code 1
====================================== ERROR ====================================
2023-02-24 07:05:58.765Z: Failed to create container.
=================================================================================
2023-02-24 07:05:58.770Z: Error: Command failed: docker inspect --type image mcr.microsoft.com/devcontainers/jekyll:0-${templateOption:imageVariant}
2023-02-24 07:05:58.773Z: Error Code: 1302
====================================== ERROR ====================================
2023-02-24 07:05:58.776Z: Container creation failed.
=================================================================================
It fails at the same point as it did on my local-machine (docker inspect).
The error-point (async Qse) is consistent between rebuilds.
I’m assuming the error-code (1302) is a codespace-output since the process exited-1 and the error-json did not contain the error-code.
However, I could be wrong.
I won’t pretend to know why this may be happening.
The build was successful on your end, and this error has not happened before.
Just for good measure I ported the most-recent Jekyll-devcontainer into a new repository, with a new codespace, and still got the same error.
from templates.
@samruddhikhandale I will say though; the more I think about it, the more I think it’s an issue with the "2.7 bullseye" cross-compiler.
All of the boxes seem to be checked:
- Running on some machines, but not others, despite being the same build
- Failing during an async task-queue, which is most likely bootstrapping processes. This would indicate unknown instructions being sent to the kernel.
- All other bullseye-containers being functional and not running on 2.7
This is just speculation, since I have no idea what the source is doing, but it’s interesting to think about
from templates.
2023-02-24 07:05:58.770Z: Error: Command failed: docker inspect --type image mcr.microsoft.com/devcontainers/jekyll:0-${templateOption:imageVariant}
Looks like you copied over the jekyll template instead of adding it from Add dev container configuration files...
command? that's the reason why it fails in a codespace as it has unresolved ${templateOption:imageVariant}
variable.
@meg-io can you create template using the command pallet and retry?
from templates.
Yes, this solved the issue, I will mark it as closed. Thank you for the assistance.
Addendum:
The devcontainer worked recently, even with the unresolved variable, so I assumed it wasn’t causing the error. This is not the case; if you are in a similar situation, resolve the variable.
After checking the other four containers that were working, they all had the variable resolved - so the solution checks out. By code or by music, KISS reigns supreme.
Working solution (as per @samruddhikhandale):
- Open VSCode Command Palette
- Use
Add dev container configuration files...
- Select desired devcontainer-configs
- Use
Full Rebuild
If you happen to be using the devcontainer outside of visual-studio, the configuration-file (devcontainer.json) can also be manually adjusted. Adjust
${templateOption:imageVariant}
to the desired option.
from templates.
Related Issues (20)
- Question on Debian / Ubuntu & Centos/RHEL/Azure Linux family of support HOT 1
- Nice HOT 1
- Writing a VSCode extension, want to enable "Attach Visual Studio Code" to kubectl pod HOT 4
- Request: a devcontainer suitable for developing Electron applications HOT 2
- The Anaconda image specified in the documentation is not available.
- [JS -node-mongo] Add Template options for bookworm
- How to initiate xdebug via web browser? HOT 2
- "Using localhost in Docker Compose" doc can have some improvement HOT 1
- ruby-rails-postgres devcontainer has no internet access
- Hi 👋 HOT 1
- dotnet template should include a volume mount for nuget package caching HOT 1
- include C# Dev Kit in dotnet template HOT 3
- Pin PostgreSQL version in `*-postgres` templates HOT 2
- javascript-node-mongo not building the container HOT 2
- Could not connect to mariaDB with imageVariant default HOT 1
- Docs about templates usage and behavior HOT 4
- Is there a way to `publish` template as image?
- typescript-node npm scripts error access HOT 1
- Stuck in "Replacing imageVariant with ..." step HOT 6
- I am a greener. Just ask a simple question about the toolchain in the container. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.