vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Support for the Containerization Framework on macOS

Open nexryai opened this issue 6 months ago • 1 comments

Containerization Framework is a new way supported by Apple to run Linux containers on macOS. Apple also releases a command line tool similar to Docker.

It will be a great benefit to developers if they can use it as a backend for VSCode remote development and devcontainer.

nexryai avatar Jun 10 '25 01:06 nexryai

Since running macOS 26 beta Docker Desktop stopped working entirely. I understand the availability of alternative backends, but Apple's Container Framework offers unique benefits. I'm really keen on seeing native support for Apple's Containerization framework in Dev Containers.

buelbuel avatar Jun 12 '25 19:06 buelbuel

Dev Containers 0.424.0-pre-release adds F1 > Dev Containers: Attach to Running Apple Container behind an experimental setting:

Image

It seems to work with a basic Ubuntu container, but using, e.g., mcr.microsoft.com/devcontainers/typescript-node:latest hangs sometimes during startup. Not sure where that fails.

This is in an early state. Curious about your feedback, thanks!

chrmarti avatar Jul 14 '25 10:07 chrmarti

Awesome!

As long as I test with a basic Docker image such as node:24, it seems to work fine. I was able to attach to the container I created with the command below and access a development server for a basic web app created with Svelte and Vite.

container run --rm -v ~/Developer:/workspace/VSCode --user node node:24 sleep infinity

Extensions and such appear to work. Port forwarding is not working, but that's not a big deal for me, since I can access it using the local address shown on Vite with the --host 0.0.0.0 option.

Image

nexryai avatar Jul 15 '25 11:07 nexryai

It seems to work with a basic Ubuntu container, but using, e.g., mcr.microsoft.com/devcontainers/typescript-node:latest hangs sometimes during startup. Not sure where that fails.

Having a similar problem with my ubuntu-based container. CMake build always hangs in some point. I've investigated this but didn't found a root cause :( Looks like a bug in the Apple Virtualization framework.

P.S. Extension works fine at least on the first look. Well done!

UPD: The same issue has been reported already: https://github.com/apple/container/issues/293

yerseg avatar Jul 15 '25 14:07 yerseg

Port forwarding is not working, but that's not a big deal for me, since I can access it using the local address shown on Vite with the --host 0.0.0.0 option.

I had to add the port manually in the Ports panel. Then it worked. It looks like the automatic port discovery doesn't work.

chrmarti avatar Jul 16 '25 07:07 chrmarti

I have Dev Containers 0.424.0-pre-release, container installed and running on my system and also enabled the experimental dev.containers.experimentalAppleContainerSupport setting. Still my VS Code complaints that Docker version 17.12.0 or later required. whenever I try to setup a dev container or attach my project to one (Docker Desktop is not anymore installed right now). Any idea?

eckertj avatar Aug 05 '25 21:08 eckertj

@eckertj I am in the same boat. Fresh Tahoe install with only container and vscode installed. All docker related items in Container Tools will not show up. I believe those are separate issues:

  • microsoft/vscode-containers#143
  • microsoft/vscode-docker-extensibility#291

You can however connect directly to devcontainer via command palette:

Image

firien avatar Sep 16 '25 14:09 firien