Commit Graph

21 Commits

Author SHA1 Message Date
Dmitry Kovba f3db805e3a Add a build parameter to handle warnings as errors (#591)
To handle warnings as errors when building, use make. To allow warnings,
use make WARNINGS_AS_ERRORS=false test.

Also see https://github.com/apple/containerization/pull/271.
2025-09-09 17:39:50 -07:00
Kathryn Baldauf d6b2243c75 Add force option to kernel set and add tests for kernel setting (#579)
## Type of Change
- [x] New feature  

## Description
Add option to force kernel setting and tests for CLI `kernel set`.
Related to https://github.com/apple/container/pull/575.

## Motivation and Context
This PR adds additional tests to ensure that we can set kernels from
local files, remote tar files, and local tar files. A new option `force`
is added to the `kernel set` subcommand which will overwrite an existing
kernel with the same name if one exists to make testing easier. The
tests ensure that a container can be started with the newly set kernel
and resets to the default recommended kernel when complete.

## Testing
- [x] Tested locally
- [x] Added/updated tests

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-09-05 11:51:07 -07:00
J Logan 4ac18b54f3 Test fixes for 0.4.1 release. (#550)
- Disabled tests that failed with release config.
- Changed so merge builds build with release config so this doesn't burn
us next release.
- Added `swift --version` to Makefile so we can see what we're running
up in CI.
2025-08-27 18:04:00 -07:00
J Logan 88223d8add Select alternate data path with container system start --app-root path. (#419)
Closes #418.
2025-08-06 14:49:09 -07:00
Raj b8965cae43 Named Volumes (#362)
Closes #339.

This change adds named volume support to container, providing volume
management CLI commands - `create, delete, list and inspect`. The
implementation uses EXT4 block-based persistent storage with a new
`VolumesService` actor for thread-safe operations, integrates seamlessly
with the existing container mount system through a new `.volume`
filesystem type, and provides atomic volume operations with XPC-based
API communication. Volumes are stored in isolated directories with
configurable sizes (default 512GB) and include proper cleanup and
container usage tracking for safe deletion.

Example Usage:

```
# Create a volume
container volume create mydata

# Use volume in container
container run -v mydata:/data alpine

# List volumes
container volume list

# Inspect volume details
container volume inspect mydata

# Clean up
container volume rm mydata
```
2025-08-05 21:47:42 -07:00
Dmitry Kovba 9e9d056339 Transition to Mutex (#364)
Due to the reduced use of the macro, we can now fully transition to
`Mutex`.
2025-07-31 13:36:18 -07:00
Kathryn Baldauf 047c1afe96 Fix user arg passthrough for container create (#393)
This matches other container commands that rely on user arguments at the
end, such as `container run`. Closes #395.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-07-29 13:54:12 -07:00
Raj cc91ad7bf5 Quote paths in Makefile (#350)
Adds quotes around all variable‑derived paths in the Makefile to ensure
builds succeed when the project is located in directories that contain
spaces.
2025-07-17 17:17:13 -07:00
Aditya Ramani 5dd8f0f1c1 Cleanups for CI (#287)
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2025-07-01 16:08:33 -07:00
J Logan 3b5c253059 Adds container network for macOS 26. (#243)
See discussion below for example. For multiple network interfaces in a
single container we'll want to integrate against a containerization that
includes apple/containerization#156.

The change bumps the containerization dependency to 0.2.0 and addresses
the breaking API changes.

```console
% container network
OVERVIEW: Manage container networks

USAGE: container network <subcommand>

OPTIONS:
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  create                  Create a new network
  delete, rm              Delete one or more networks
  list, ls                List networks
  inspect                 Display information about one or more networks

  See 'container help network <subcommand>' for detailed help.
```
2025-06-27 14:12:29 -07:00
Kathryn Baldauf 3fcd0dda67 Add version info to package installer (#249)
Fixes https://github.com/apple/container/issues/203

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-06-27 13:50:37 -07:00
Dmitry Kovba de2be705de Remove the support for CURRENT_SDK (#251)
This PR removes the no longer needed support for `CURRENT_SDK`.
2025-06-26 10:40:34 -04:00
Dmitry Kovba 5d36134b96 Regenerate documentation on make docs (#246)
This PR allows using `make docs` without manually removing the existing
`_site` folder.
2025-06-24 12:46:50 -07:00
Danny Canter 37c9732c4c makefile: Change build_bin_dir to be lazily evaluated (#221)
The bin directory for placing built binaries to should be lazily
evaluated, as we change BUILD_CONFIGURATION during `make release`.
2025-06-16 23:11:58 -07:00
Kathryn Baldauf 157bacf6a4 Make test suites run sequentially with respect to other test suites (#200)
Right now swift testing does not have finer grain test parallelization
controls. As a result our easy options are either to have ALL tests in
ALL test suites run sequentially or have tests within a given test suite
run sequentially while other test suites are run at the same time.

This has been problematic for our CI since we opted for the second
option above, where, for examples, the tests in the builder test suite
run sequentially, but the builder test suite runs at the same time as
the container run test suite. When this happens, a lot of different
tests try to pull the necessary images for testing at the same time,
causing some tests to timeout.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-06-16 12:38:55 -07:00
Josh Soref 4a4ad40d74 Spelling (#207)
This PR corrects misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling)

The misspellings have been reported at
https://github.com/jsoref/container/actions/runs/15662939575/attempts/1
The action reports that the changes in this PR would make it happy:
https://github.com/jsoref/container/actions/runs/15662939742/attempts/1#summary-44123289718

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-06-16 10:49:03 -07:00
J Logan 9868562b5a Adds base path for GitHub Pages publishing. (#69) 2025-06-09 17:15:05 -07:00
Aditya Ramani f86dcefb04 Add make target to fetch the default kernel (#33)
Replaces the `--install-dependencies` flag with the
`(enable/disable)-kernel-install` flag. If the flag is not passed - the
default behavior is prompting the user for a response.

Also adds a make target `install-kernel`

```
➜ bin/container system start
Verifying apiserver is running...
Installing base container filesystem...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: n
Please use the `container system kernel set --recommended` command to configure the default kernel

➜ bin/container system start --disable-kernel-install
Verifying apiserver is running...

➜ bin/container system start --enable-kernel-install
Verifying apiserver is running...
Installing kernel...

➜ bin/container system start --help

USAGE: container system start ... [--enable-kernel-install] [--disable-kernel-install]
...
  --enable-kernel-install/--disable-kernel-install
                          Specify if the default kernel should be installed or not.

```

---------

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2025-06-07 12:45:45 -07:00
Aditya Ramani 007f9a41f7 Update kernel install UX (#22)
This change updates the UX when we install required dependencies at
first launch


### Fresh install - respond `y` to prompt
```
➜ bin/container system start
Verifying apiserver is running...
Installing base container filesystem...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: y
Installing kernel...
```


### Fresh install - respond `n` to prompt and then run the provided
command
```
➜ bin/container system start
Verifying apiserver is running...
Installing base container filesystem...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: n
Please use the `container system kernel set --recommended` command to configure the default kernel

➜ bin/container system kernel set --recommended
Installing the recommended kernel from https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz...
```


### Fresh install - respond `n` to prompt and then run a container
```
➜ bin/container system start
Verifying apiserver is running...
Installing base container filesystem...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: n
Please use the `container system kernel set --recommended` command to configure the default kernel

➜ bin/container run alpine uname
Error: notFound: "Default kernel not configured for architecture arm64. Please use the `container system kernel set` command to configure it
```

---------

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2025-06-05 18:09:36 -07:00
Kathryn Baldauf ec4185fcc7 Publish docs github action (#9)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-06-05 15:53:13 -07:00
Kathryn Baldauf 8e9670c8f8 Initial commit
Co-authored-by: Aditya Ramani <a_ramani@apple.com>
Co-authored-by: Agam Dua <agam_dua@apple.com>
Co-authored-by: Danny Canter <danny_canter@apple.com>
Co-authored-by: Dmitry Kovba <dkovba@apple.com>
Co-authored-by: Eric Ernst <eric_ernst@apple.com>
Co-authored-by: Evan Hazlett <ehazlett@apple.com>
Co-authored-by: Gilbert Song <gilbertsong@apple.com>
Co-authored-by: Hugh Bussell <hbussell@apple.com>
Co-authored-by: John Logan <john_logan@apple.com>
Co-authored-by: Kathryn Baldauf <k_baldauf@apple.com>
Co-authored-by: Madhu Venugopal <mvenugopal@apple.com>
Co-authored-by: Michael Crosby <michael_crosby@apple.com>
Co-authored-by: Sidhartha Mani <sidhartha_mani@apple.com>
Co-authored-by: Tanweer Noor <tnoor@apple.com>
Co-authored-by: Ximena Perez Diaz <xperez528@gmail.com>
Co-authored-by: Yibo Zhuang <yzhuang@apple.com>
2025-06-05 15:51:55 -07:00