Arnav ReddyandArnav Reddy cd94337f27 Truncate container log files to remove logging delay on restarted container (#26)
When a container that was writing stdout/stderr to its dedicated
container log file was stopped and started, there was a ~20 second - 1
minute delay from when the init process was restarted and when the
output of the process was written to the log file. This also meant there
was a delay when streaming those logs using `container logs -f`. The
logs from that delay period were lost.

This change forces the container log file to update state after a
container restart which fixes the delays to the container log file. And
the` container logs -f` stream resets its position in the file on a
container restart as well.

---------

Co-authored-by: Arnav Reddy <areddy23@apple.com>
2025-06-06 11:27:34 -07:00
2025-06-05 15:51:55 -07:00
2025-06-05 18:50:40 -07:00
2025-06-05 15:53:13 -07:00
2025-06-05 15:51:55 -07:00
2025-06-05 15:51:55 -07:00
2025-06-05 18:50:40 -07:00
2025-06-05 15:53:50 -07:00
2025-06-05 15:53:50 -07:00
2025-06-05 15:51:55 -07:00
2025-06-05 15:51:55 -07:00
2025-06-05 18:09:36 -07:00
2025-06-05 15:52:13 -07:00
2025-06-05 18:50:40 -07:00
2025-06-05 18:50:40 -07:00

introductory movie showing some basic commands

container

container is an application that you can use to create and run Linux containers as lightweight virtual machines on your Mac. It's written in Swift, and optimized for Apple Silicon.

The application consumes and produces OCI-compliant container images, so you can pull and run images from any standard container registry. You can push images that you build to those registries as well, and run the images in any other OCI-compliant application.

container uses the Containerization Swift package for low level container, image and process management.

Get started

Install the container application on your Mac.

Requirements

You need an Apple Silicon Mac to run container. To build the application, see the BUILDING document.

container is designed to take advantage of the features of the macOS 16 Developer Preview. You can run the application on macOS Sequoia, but the container maintainers typically will not address Sequoia issues that cannot be reproduced on the macOS 16 Developer Preview.

There are significant networking limitations that impact the usability container on macOS Sequoia.

Install or upgrade

If you're upgrading, first uninstall your existing container while preserving your user data:

uninstall-container.sh -k

Download the latest application installer package from the Github release page.

To install the application, double click the package file and follow the instructions. Enter your administrator password when prompted to give the installer permission to place the application under /usr/local.

Uninstall

Use the uninstall-container.sh script to remove the application from your system. To remove your user data along with the application, run:

uninstall-container.sh -d

To retain your user data so that it is available should you reinstall later, run:

uninstall-container.sh -k

Next steps

S
Description
A tool for creating and running Linux containers using lightweight virtual machines on a Mac. It is written in Swift, and optimized for Apple silicon.
Readme Apache-2.0
23 MiB
Languages
Swift 98.1%
Shell 0.9%
Makefile 0.8%
C 0.2%