Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu container machine

This directory builds a persistent Ubuntu 24.04 environment for Apple container, with systemd running as PID 1. The normal ubuntu:24.04 OCI image is intended to run one application and does not contain /sbin/init, so it cannot boot directly as a container machine. This Dockerfile installs systemd and masks services that do not work in this VM setup.

The recipe follows Apple's container machine documentation.

Build and create the machine

Start the Apple container service:

container system start

Then run the three build and setup commands:

./build.sh

The script builds local/ubuntu-machine:24.04, creates a persistent machine named ubuntu, and makes it the default container machine.

Use Ubuntu

Open an interactive shell:

container machine run -n ubuntu

Apple container creates a Linux user matching the macOS user and shares the macOS home directory with the machine. A stopped machine starts automatically when container machine run is called.

Check systemd

Run the two checks in check.sh:

./check.sh

The first reports whether systemd reached a usable state. The second lists running services.

About

A persistent Ubuntu environment for Apple `container`, with `systemd`

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages