맥북에 컨테이너로 리눅스 실행하기 쉬워졌어요… 설정 방법
출처: ZDNet
Jack Wallen/ZDNETFollow ZDNET: Add us as a preferred source on Google.
ZDNET의 핵심 포인트
- Container 은 macOS에서 Linux를 개발하는 데 Solid한 도구다.
- 가볍고 Apple 실리콘에 배포되는 Linux 컨테이너를 제공한다.
- Container 는 무료 명령줄 툴이다.
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
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 'Hello
## Hello, ZDNET!
' > 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, ZDNET! 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.
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.