Open source

Container makes it easy to run Linux on a MacBook with Apple silicon

At a glance:

  • Container is a free CLI tool that runs Linux containers as lightweight VMs on Apple‑silicon Macs.
  • It uses a Swift‑based init system (vminitd) and feels familiar to Docker or Podman users.
  • The tutorial shows how to install, build a hello‑web image, run it, and access the page at 192.168.64.3.

How Container works

Container is a command‑line utility designed specifically for macOS machines equipped with Apple silicon processors. It lets developers create and run Linux containers without needing a remote virtual machine or a full Linux distribution, by packaging each container in its own lightweight VM. The tool has been available since 2025 and the latest release is tuned for the ARM‑based architecture of M1, M2 and later Macs.

Unlike Docker, which relies on a daemon and shares the host kernel, Container launches each container in an isolated lightweight virtual machine that boots via a Swift‑based init system called vminitd. This design gives performance close to native containers while preserving the familiar CLI workflow; users who have used docker run or podman run will recognize the same command syntax and options.

Although Container is currently a pure CLI tool, the project’s roadmap includes a graphical front‑end called ContainerKit that is under active development. No installable releases of ContainerKit exist yet, but the authors promise that GUI alternatives will appear soon, making the tool even more approachable for newcomers to containerization.

Step‑by‑step tutorial

Installation is straightforward: download the Container installer package, double‑click it to launch the user‑friendly wizard, and follow the prompts until the process finishes. Once installed, the container command is available in your terminal and ready to use.

To build a simple web‑server image, first create a project directory and navigate into it:

mkdir hello-web
cd hello-web

Then create a Dockerfile with the following contents (you can use nano Dockerfile or any editor):

FROM docker.io/python:alpine
WORKDIR /content
RUN apk add curl
RUN echo '<!DOCTYPE html><html><head><title>Hello</title></head><body><h1>Hello, ZDNET!</h1></body></html>' > index.html
CMD ["python3", "-m", "http.server", "80", "--bind", "0.0.0.0"]

Explanation of each line:

  • FROM pulls the base image.
  • WORKDIR sets the working directory inside the container.
  • The first RUN installs the curl utility.
  • The second RUN writes the HTML file that displays Hello, ZDNET!.
  • CMD starts a Python HTTP server on port 80, bound to all interfaces.

Build the image with:

container build --tag hello-web --file Dockerfile .

After the image is built, launch the container in detached mode:

container run --name hello-web-server --detach hello-web

To see the running container and obtain its IP address, run:

container ls

The output will resemble:

hello-web-server   hello-web:latest   linux   arm64   running   192.168.64.3/24   4   1024 MB   2026-06-15T13:23:40Z

Open a browser and navigate to http://192.168.64.3 to view the Hello, ZDNET! page, confirming that the container is serving content correctly.

Editorial SiliconFeed is an automated feed: facts are checked against sources; copy is normalized and lightly edited for readers.

FAQ

What is Container and how does it differ from Docker?
Container is a free command‑line tool that runs Linux containers as lightweight virtual machines on Apple‑silicon Macs, using a Swift‑based init system called vminitd. Unlike Docker, which relies on a daemon and shares the host kernel, Container isolates each container in its own VM, providing performance close to native containers while keeping a familiar CLI syntax. The tool has been available since 2025 and is optimized for M1, M2 and later Mac processors.
How do you install Container on an Apple‑silicon Mac?
Installation is straightforward: download the Container installer package, double‑click it to launch the user‑friendly wizard, and follow the prompts until the process finishes. Once installed, the `container` command becomes available in your terminal and is ready to use. No additional dependencies are required beyond the installer itself.
How can you run a simple web server with Container and view the page?
First create a directory, navigate into it, and create a Dockerfile that pulls python:alpine, installs curl, writes an HTML file with Hello, ZDNET!, and starts a Python HTTP server on port 80. Build the image with `container build --tag hello-web --file Dockerfile .`, then run it detached via `container run --name hello-web-server --detach hello-web`. Use `container ls` to find the container’s IP address (shown as 192.168.64.3 in the example) and open http://that‑address in a browser to see the page.

More in the feed

Prepared by the editorial stack from public data and external sources.

Original article