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

Update VSCode devcontainer image #242

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

pdcastro
Copy link
Contributor

@pdcastro pdcastro commented Feb 5, 2024

While working on another PR, I found that the VSCode command “Reopen in Container” (devcontainer) was failing with a "No such image” error in the devcontainer build logs. I gather that the “universal” image named in devcontainer.json is not available for the Apple Silicon (MacBook) CPU architecture:

$ docker pull mcr.microsoft.com/devcontainers/universal:2
2: Pulling from devcontainers/universal
no matching manifest for linux/arm64/v8 in the manifest list entries

$ docker pull mcr.microsoft.com/devcontainers/universal:latest
latest: Pulling from devcontainers/universal
no matching manifest for linux/arm64/v8 in the manifest list entries

The image description currently includes this note:

ARM64 support
Due to an issue with Debian 10 / Buster and Ubuntu 20.04 / Focal that results in segmentation faults in libssl in a variety of scenarios, we only build arm64 architecture images that use one of the following operating systems:

  • Debian 11 / Bullseye
  • Ubuntu 18.04 / Bionic

But the universal image does not seem to be available in those variants. I found that the Python image works fine though:

$ docker pull mcr.microsoft.com/devcontainers/python:3
3: Pulling from devcontainers/python
Digest: sha256:a2c4de938fc8c5eb846711e807bfe50a0d809626b0631244441b8d6368590d43
Status: Downloaded newer image for mcr.microsoft.com/devcontainers/python:3
mcr.microsoft.com/devcontainers/python:3

Also, I understand that the universal image is a ”large container image [that] includes a number of runtime versions for popular languages like Python, Node, PHP, Java, Go, C++, Ruby, and .NET Core/C#” (ref), whereas the Python image only includes support for Python. But I also understand that only Python is required for Home Assistant development.

@pdcastro pdcastro force-pushed the devcontainer-gitignore branch from 3eea255 to 8c5d128 Compare February 6, 2024 00:37
@@ -1,5 +1,5 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"image": "mcr.microsoft.com/devcontainers/python:3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides what’s argued in the PR description, for what it’s worth, the Home Assistant core repo also uses the devcontainer python image rather than the universal image:

Dockerfile.dev
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.11

By the way, I gather that the following two images are the same:

  • mcr.microsoft.com/devcontainers/python
  • mcr.microsoft.com/vscode/devcontainers/python

As they have the same hash:

$ docker pull mcr.microsoft.com/devcontainers/python:3
3: Pulling from devcontainers/python
Digest: sha256:a2c4de938fc8c5eb846711e807bfe50a0d809626b0631244441b8d6368590d43

$ docker pull mcr.microsoft.com/vscode/devcontainers/python:3
3: Pulling from vscode/devcontainers/python
Digest: sha256:a2c4de938fc8c5eb846711e807bfe50a0d809626b0631244441b8d6368590d43

@mitch-dc mitch-dc merged commit 5e28500 into mitch-dc:main Feb 19, 2024
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

Successfully merging this pull request may close these issues.

2 participants