Coder Social home page Coder Social logo

Comments (5)

samruddhikhandale avatar samruddhikhandale commented on May 22, 2024

I tried to open a dev container with the jekyll template and it was successful.

image

I wonder if the docker cache is interfering with the inspect?

from templates.

 avatar commented on May 22, 2024

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.

 avatar commented on May 22, 2024

@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.

samruddhikhandale avatar samruddhikhandale commented on May 22, 2024

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.

 avatar commented on May 22, 2024

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):

  1. Open VSCode Command Palette
  2. Use Add dev container configuration files...
  3. Select desired devcontainer-configs
  4. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.