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:
FROMpulls the base image.WORKDIRsets the working directory inside the container.- The first
RUNinstalls the curl utility. - The second
RUNwrites the HTML file that displays Hello, ZDNET!. CMDstarts 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.
FAQ
What is Container and how does it differ from Docker?
How do you install Container on an Apple‑silicon Mac?
How can you run a simple web server with Container and view the page?
More in the feed
Prepared by the editorial stack from public data and external sources.
Original article