惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
PCI Perspectives
PCI Perspectives
S
Schneier on Security
E
Exploit-DB.com RSS Feed
T
Troy Hunt's Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
News and Events Feed by Topic
H
Heimdal Security Blog
T
The Exploit Database - CXSecurity.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Privacy International News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
AWS News Blog
AWS News Blog
Engineering at Meta
Engineering at Meta
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
爱范儿
爱范儿
T
Tor Project blog
Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
Attack and Defense Labs
Attack and Defense Labs
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
Scott Helme
Scott Helme
Jina AI
Jina AI
Recent Announcements
Recent Announcements
博客园 - Franky
I
Intezer
S
Security Affairs
C
Check Point Blog
D
DataBreaches.Net
D
Docker
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
美团技术团队
小众软件
小众软件
S
Security Archives - TechRepublic
C
Cyber Attacks, Cyber Crime and Cyber Security
Vercel News
Vercel News
Project Zero
Project Zero
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
AI
AI
博客园 - 【当耐特】
NISL@THU
NISL@THU

Latest news

暂无文章

Container made it easy to run Linux on my MacBook - here's how I set it up
Jack Wallen · 2026-06-15 · via Latest news
containerhero
Jack Wallen/ZDNET

Follow ZDNET: Add us as a preferred source on Google.


ZDNET's key takeaways

  • Container is a solid tool to develop for Linux on MacOS.
  • It deploys lightweight Linux containers on Apple silicon.
  • Container is a free command-line tool.

I've used all sorts of container tools over the years: Docker, Docker Desktop, Podman, Portainer… the list goes on. Most of my container work has been handled on various Linux machines, but every once in a while, I want to work with my MacBook. Either way, I've found there are always choices.

My first choice (when using my MacBook) is to SSH into a Linux machine and work from the command line. But what happens when I don't have a network available (or I'm away from my home)?

Well, there's a new version of the command-line tool for MacOS, called Container, that is just as good as the tools I've used on Linux. 

Container has been around since 2025 and is a handy piece of software that allows you to create and run Linux containers as lightweight virtual machines on your MacOS Apple silicon-powered machine. The latest release of Container is optimized specifically for Apple Silicon Mac hardware. If you've ever used the Docker command-line tool, you'll feel right at home with Container. 

Also: The best Linux distributions for beginners: Expert tested and reviewed

The difference between Container and Docker is that with Container, each container runs in its own lightweight virtual machine and is launched using a Swift-based init system (vminitd). Container is fast and will be familiar to anyone who has previously worked with tools like Docker or Podman.

I'm going to walk you through the installation and usage of Container on a MacBook, but it can be installed on any desktop or laptop running Apple silicon.

Installing Container

Installing Container is simple.

Once the file has downloaded, double-click it to launch the user-friendly installation Wizard. Walk through the simple steps until the installation is complete.

Show more

Container

Installing Container is much easier than you might think.

Jack Wallen/ZDNET

That's all there is to installing Container.

Using Container

Now we get to the fun part. 

I'm going to demonstrate how to deploy a simple web server that'll serve a Hello page, displaying "Hello, ZDNET!".

1. Start Container

The first thing you must do is start the Container system, which is done with the command:

container system start

You should see no errors in the output. To verify the system has started, run the command to list all running containers (of which there are currently none). That command is:

container list --all

The output of the above command will be:

ID  IMAGE  OS  ARCH  STATE  IP

If you see that, Container is successfully running and ready to go.

2. Build your first image

If you know anything about containers, you understand that everything starts with an image. If you've never used containers, think of an image as a stripped-down operating system that contains only what you need to run a particular container. 

Also: Linux will be unstoppable in 2026 - but one open-source legend may not survive

The first thing you'll want to do is create a directory to house our little project. Do that with the command:

mkdir hello-web

Change into that new directory with the command:

cd hello-web

The next step is to create a Dockerfile that will contain all of the necessary configurations for our Hello web server. Create the file with the command:

nano Dockerfile

In that file, paste the following contents:

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"]

Save and close the file with the keyboard shortcut Ctrl+X.

Let's break down the above:

  • FROM -- This instructs Container what remote image to pull that will be used as our base.
  • WORKDIR -- This is the directory (that will be created within our hello-web directory) that will house everything.
  • RUN -- This is the first command that will be run within the image and installs the curl app.
  • RUN -- This is the second command that creates the index.html file that includes the Hello, ZNDET! text that will be displayed in the H1 format.
  • CMD -- This command configures the web server to run on port 80 and use the 0.0.0.0 address (so it's accessible to your web browser).

Next, we have to build our new image that will be used to create the web server container. This is done with the command:

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

3. Deploy the web server

With the image built, we can now deploy the web server with the command:

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

The above command deploys a container named hello-web-server in the background (by way of the --detach option) using the hello-web image.

4. Viewing your deployed Hello web page

To view your newly deployed web page, you first need to locate the IP address it is using. To do that, issue the command:

container ls

You should see something like this in the output:

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

The IP address for the above hello-web-server container is 192.168.64.3. If you open your browser and point it to that address, you should see Hello, ZDNET! on the page.

Container

Success!

Jack Wallen/ZDNET

Congratulations, you just deployed your first container using the Apple silicon-optimized container tool.

Also: How to connect to a VirtualBox virtual machine from your LAN

Although this isn't a point-and-click-friendly tool, there are GUIs, such as ContainerKit, that are in heavy development. There are currently no installable releases for ContainerKit, but you can be certain there will be in the near future. As well, there will be other GUI apps that will eventually appear to help make this tool even easier.

Featured