Skip to content
Tech News
← Back to articles

macOS Container Machines

read original more articles

Container machine

Container machine provides a highly integrated Linux environment that works seamlessly on your Mac. Container machines are fast, lightweight and persistent. They are based on standard OCI images that can be built and shared. Host integrations such as automatic user and home directory sharing provide quick and easy access to your Linux environment no matter where you are in a terminal.

Why container machines

Containers are typically modeled after an application. A container machine is modeled after a Linux environment. It runs the image's init system allowing you to register long running services or test your application under a process supervisor. A container machine automatically maps your username and home directory into the Linux environment. Your repositories and dotfiles are available on both platforms. Use editors and tools directly on macOS simultaneously building and running your application inside of the Linux environment.

Edit on the Mac, build inside. Your repo lives in $HOME on macOS and is mounted at /Users/<username> inside the container machine. Use your macOS editor or IDE; compile and run inside your container machine.

Your repo lives in on macOS and is mounted at inside the container machine. Use your macOS editor or IDE; compile and run inside your container machine. Use macOS-native tooling against Linux artifacts. Profilers, screenshot tools, browsers, and GUI debuggers on your Mac all see the same files the container machine sees — there is no copy step between "I built it" and "I am inspecting it".

Profilers, screenshot tools, browsers, and GUI debuggers on your Mac all see the same files the container machine sees — there is no copy step between "I built it" and "I am inspecting it". Real Linux services for testing. Run a database or whatever your stack needs as a system service — systemctl start postgresql works on images with systemd installed.

Run a database or whatever your stack needs as a system service — works on images with installed. One environment per target distro. Create as many container machines as you have target distros — alpine , ubuntu , debian . Each has the same $HOME and the same dotfiles from your Mac. Quickly test your application in various distributions.

Quickstart

container machine create alpine:latest --name dev container machine run -n dev whoami # your host username, not root container machine run -n dev pwd # /home/<you> — your Mac home dir, mounted in container machine run -n dev # interactive shell; cd into your repos in $HOME

... continue reading