Recommend Apple container for Mac setup (blocked on VS Code Reopen in Container)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- devops, documentation
Hướng nghiên cứu
Bắt đầu với README và .devcontainer/devcontainer.json, sau đó đọc tracker vscode-remote-release#11012 được liên kết. Xác minh xem Reopen in Container có hỗ trợ Apple container hay không, bao gồm Node 24 Feature và postCreateCommand. Hoàn tất khi các tiêu chí chấp nhận được đáp ứng mà không thay đổi khuyến nghị về OrbStack quá sớm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prefer Apple container as the Mac recommendation for the documented VS Code Dev Containers path. It should compete with (and, on Mac, replace) OrbStack and the other Docker-engine hosts. Linux and Windows stay on Docker/Podman/Colima; Apple container does not run there.
This is blocked. Stock Dev Containers: Reopen in Container does not drive Apple container. Upstream tracker:
https://github.com/microsoft/vscode-remote-release/issues/11012
Why this is the Mac preference
README already states the criterion:
We would prefer an open-source-licensed Docker implementation that runs at native speed on Mac, Linux and Windows.
Today the Mac line is OrbStack (proprietary, Docker-compatible, fast) with Colima as the slower open-source alternative. Apple container 1.4.1 is Apache-2.0, first-party, and runs each Linux OCI image as its own lightweight VM on Apple silicon + macOS 26. That matches the license preference on Mac better than OrbStack. It does not satisfy the cross-platform part of that sentence, so it is a Mac-only recommendation, not a universal Docker replacement.
Current documented approach
From README:
- Install VS Code and the Dev Containers extension.
- Install a Docker host (Mac: OrbStack).
- Run Dev Containers: Reopen in Container.
.devcontainer/devcontainer.json is the environment:
- Image:
mcr.microsoft.com/devcontainers/ruby:3.3-bookworm(minor tag matches.ruby-version). - Feature:
ghcr.io/devcontainers/features/node:2with Node 24 (must stay in sync with.node-version). Yarn 4 is via Corepack, not the feature. postCreateCommand: Corepack → Yarn 4.18.0 →yarn install --immutable→bundle install.
The non-container path is still valid: rv for Ruby (.ruby-version) and fnm for Node (.node-version). package.json scripts call rv run bundle exec …, so they are written for that host toolchain, not for a Linux image that already has the right ruby on PATH.
What works today with Apple container (no Docker)
Verified on Apple silicon, macOS 26.6.2, container CLI 1.4.1, container system start --enable-kernel-install.
OCI run/build:
container run --rm alpine echo hello
container image pull python:alpine
container build --tag web-test --file /abs/path/Dockerfile .
container run -d --name web web-test
container exec web ls /
container logs web
container stop web
--file Dockerfile is resolved against the process cwd, not the build context directory. Pass an absolute path.
Bind mounts work, including the destination= alias and readonly:
container run --rm \
--mount source="$PWD",destination=/work,readonly \
-w /work \
python:alpine python -c 'open("README.md").read()'
This repo's Jekyll site builds and serves from Apple container if you skip Dev Containers entirely:
container run -d --name site-dev --cpus 4 --memory 4G \
--volume "$PWD:/work" --workdir /work \
ruby:3.3.4-bookworm sleep 36000
container exec site-dev bash -lc 'bundle install && bundle exec jekyll build'
container exec site-dev bash -lc 'bundle exec jekyll serve --host 0.0.0.0 --port 4000 --livereload'
Guest Ruby is 3.3.4. bundle exec jekyll build writes build/. The server answers on the container's vmnet IPv4 (192.168.64.x:4000). Browser load of that URL shows the site. 127.0.0.1:4000 does not: this site-dev was not started with -p, and when -p 8000:8000 / -p 127.0.0.1:8000:8000 was tested on a Python HTTP server, publishedPorts showed in container inspect but curl to localhost connected and hung. Curl to the container IP returned 200. Same localhost-vs-IP pattern is reported on the VS Code issue.
Do not document container machine for this template. Default home-mount is rw (Mac $HOME at the same path). First container machine run after create often fails with Operation not supported by device. alpine:latest also crashed on missing /sbin/openrc; Apple's examples use alpine:3.22.
Where Reopen in Container stops
Dev Containers: Reopen in Container is not container run. It:
- Reads
.devcontainer/devcontainer.json. - Talks to a Docker Engine API (unix socket) plus a
dockerCLI. - Pulls/builds, creates the container, bind-mounts the workspace.
- Installs Dev Container Features (this repo's Node 24 is one).
- Runs
postCreateCommand. - Installs
vscode-serverand reopens the window attached to that guest.
Apple container has no Docker socket and no Compose. Setting dev.containers.dockerPath / dockerComposePath to container does not work: the extension speaks Docker's HTTP API and Docker CLI JSON, not Apple's CLI. Without a Docker engine, VS Code reports that Docker is missing (Docker version 17.12.0 or later required).
Microsoft's current support, from vscode-remote-release#11012 (Backlog, assigned to @chrmarti):
- Dev Containers 0.424.0-pre-release added Dev Containers: Attach to Running Apple Container behind
dev.containers.experimentalAppleContainerSupport. - You start the VM yourself (
container run -d … sleep infinity), then attach. devcontainer.jsonis not applied. Features are not installed.postCreateCommandis not run. You pick the workspace folder by hand.- Automatic port discovery is incomplete; forwarding sometimes needs a manual Ports-panel add.
- Attach to
mcr.microsoft.com/devcontainers/…images has been reported to hang (also discussed in apple/container#293).
That is attach, not Reopen. It is not a replacement for the README's one-command onboarding.
This repo's Node install is a Feature (ghcr.io/devcontainers/features/node:2). Features are applied by the Dev Containers toolchain talking to Docker. A plain container run of the Ruby image does not install Node 24. Baking Node into a Dockerfile would drop that dependency; that is a possible fallback if the adapter never covers Features.
yarn build / yarn dev inside a Linux guest will fail unless rv is installed there. Those scripts are for the host rv path. Inside ruby:3.3.4-bookworm, the matching command is bundle exec … (same as CI's ruby/setup-ruby). Host Yarn PnP (.pnp.cjs) is Mac-generated and untracked; do not reuse it in a Linux guest.
Adapters that exist and are not the template default
| Approach | What it is | Why it is not the README line yet |
|---|---|---|
| socktainer | Docker Engine API v1.51 (partial) on a unix socket in front of Apple container |
Closest "pretend to be Docker" adapter. API is partial; Reopen + Features against this file is unproven. Extra daemon to install. |
CLI shims (docker → container) |
Translate some flags | VS Code copies files, execs, watches events, installs Features. A flag translator is too thin. |
| wcgomes/apple-devcontainers | Swift CLI that reads devcontainer.json and can --vscode attach |
Third-party; not the stock Reopen command. |
| Apple Container Manager | Separate "Reopen" via Remote-SSH | Different config path (.appcontainer/devcontainer.json), requires sshd in the image. |
Acceptance
Keep OrbStack (and Colima) on the README until one of these is true:
- Dev Containers: Reopen in Container against this
.devcontainer/devcontainer.jsonworks with only Applecontainer(and whatever Microsoft ships). Features install Node 24.postCreateCommandruns. The window attaches at the workspace mount. Tracked on vscode-remote-release#11012. - Or a Docker-socket adapter (socktainer or equivalent) is complete enough that the same Reopen path works, and we are willing to document installing that adapter.
Then:
- README Mac Docker-host sentence recommends Apple
container(brew install containeror Apple's signed pkg, thencontainer system start). - Document that you talk to published services on the container IPv4 until localhost
-pis reliable. - Keep the
rv/fnmhost path for people who do not want a container. - Linux/Windows still recommend a Docker engine.
- Do not document
container machinefor this project.
Until the blocker lifts, do not change the OrbStack recommendation. The CLI recipe above is a verified Mac alternative, not a substitute for Reopen.
- Ngôn ngữ chính
- JavaScript
- Star
- 41
- Fork
- 48
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fulldecent/github-pages-template
-
Adopt browserslistrcĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
set up lighthouse testingCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
fulldecent/github-pages-template#156 · 1 reaction · 1 người được giao ·
Tất cả issue của fulldecent/github-pages-template
Issue tương tự
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish stepCó thể đã có người làm @albertteoh đã nhận hôm nay. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jaegertracing/jaeger-ui#4739 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
keepassxreboot/keepassxc-browser#3159 · 1 bình luận ·
-
Add: ESP 2 RSĐang mởapproved check:passed feeds:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100
-
v6: OTP input keeps the rest of a selection when you type over itCó thể đã có người làm @thejesh23 đã nhận hôm nay. Đang mởbug confirmed has-pr js v6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
twbs/bootstrap#43323 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày