The Front Page

Source: original

4h, 437p, 145 comments

macOS Container Machines

Container machine provides macOS users with a fast, lightweight, and persistent Linux environment built from standard OCI images, automatically mapping the host’s username and home directory so files and dotfiles are accessible on both platforms. It runs the image’s init system, enabling long‑running services and cross‑distribution testing (e.g., alpine , ubuntu , debian) while letting you edit on macOS and build inside the container via commands such as container machine create , container machine run , container machine set‑default , ls , inspect , stop , rm , and set to adjust CPUs, memory, or home‑mount modes. Any Linux image containing /sbin/init works, and on first boot a provisioning script creates the user; you can substitute it with an executable /etc/machine/create-user.sh script that receives variables like CONTAINER_UID and CONTAINER_USER. This tight integration removes copy steps between building on macOS and inspecting the result.