Commit Graph

29 Commits

Author SHA1 Message Date
J Logan 9692d79040 Bump containerization dependency to 0.7.2. (#610)
## Type of Change
- [ ] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
0.7.1 containerization contained a couple inadvertent commit reverts.

## Testing
- [ ] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs
2025-09-15 09:07:42 -07:00
Kathryn Baldauf 1b68728629 Update builder shim version to 0.6.1 to support default global args (#605)
## Type of Change
- [x] Dependency update

## Motivation and Context
A change was made in container-builder-shim to support BuildKit's
default global args
https://github.com/apple/container-builder-shim/pull/44. A new tag of
container-builder-shim was made with this change and this PR updates to
that new tag for container-builder-shim.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-09-12 15:11:49 -07:00
J Logan 243115504e Use containerization 0.7.1. (#606)
- Makes available the proxy utility from containerization#288.

## Type of Change
- [ ] Bug fix
- [x] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
The proxy utility allows forward progress on #533.

## Testing
- [x] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs
2025-09-12 12:49:57 -07:00
Danny Canter 8f6f39e89b Package.swift: Bump CZ to 0.7.0 (#584)
Closes #585

Has a fix for if a uid doesn't exist in /etc/passwd.
2025-09-08 11:35:30 -07:00
J Logan a8c779fd65 Uniform support for --platform, --os, --arch. (#545)
- Fixes #231.
- Extends #313 (@dcantah) so that all of `container create`, `container
run`, `container build`, `container image pull`, and `container image
save` accept the three options.
- `container build` now processes comma-separated lists for
`--platform`, `--arch`, and `--os`. It first checks `--platform`,
assembling the union of all platform values. If that set is non-empty,
the builder builds the values in the set. Otherwise, the set consists of
all combinations of the specified architecture and os values, finally
defaulting to `linux` and the host architecture if no options are
provided.
- All other commands work accept a single platform, preferring the
`--platform` option over `--arch` and `--os` when both are specified.
`--os` defaults to `linux`, and `--arch` defaults to the host
architecture.
- Clarify help messages and present the args in consistent order, with
platform first since it takes precedence if present.
- Deduplicate redundant platform options for `container build`.
2025-08-27 13:26:01 -07:00
Danny Canter b50dc253e9 Bump CZ to 0.6.2 (#543)
Hopefully fixes CI..
2025-08-26 10:39:07 -07:00
Danny Canter 7f7090ff87 Bump CZ to 0.6.1 (#540)
This has one change since 0.6.0 that just adds a log in the guest to see
the spec for any execed processes.
2025-08-25 13:38:21 -07:00
J Logan 6767144d43 Bump containerization dependency to 0.6.0 (#526) 2025-08-19 18:58:09 -07:00
J Logan e616143b95 Adds container builder rm alias. (#505) 2025-08-15 16:55:21 -07:00
Danny Canter 66426acfbb CLI: Defer tty reset immediately (#488)
We were defer closing the IO for run/exec/start fairly late in the
container run cycle which had the downside of that if the container run
failed your tty would be stuck in raw mode. This change just moves the
closing (return tty to origin state) to directly after we create the IO.
2025-08-13 15:04:18 -04:00
Sidhartha Mani 0885cdd6a9 Native Builder: DiffKey and Differ Procol (#482)
This PR introduces the `Differ` with methods:

```swift
// Differ protocol
func diff(base: Snapshot?, target: Snapshot) async throws -> Descriptor
func apply(descriptor: Descriptor, to base: Snapshot?) async throws -> Snapshot
```

It also introduces `DiffKey`, which is a MerkeTree based key for fast
diff computations between two dirs
2025-08-12 11:23:55 -07:00
Danny Canter 3fcf647c7b Add virtualization support for containers (#377) 2025-07-30 11:14:41 -07:00
Danny Canter ccd15edc16 Bump Containerization to 0.5.0 (#363)
0.5.0 introduces a new way to configure the containers and execs. This
is now done all upfront at constructor time in a callback style. I'm
very happy with the config improvements, but because IO can only be
setup at constructor time this makes it so that we need to supply IO at
creation time of the VM or exec, which isn't the end of the world. All
that really changes is `boostrap()` and `createProcess()` now take in IO
instead of slightly later in `process.start()`
2025-07-29 16:02:19 -04:00
Sidhartha Mani cc4a85bb09 add support for local build output (#369)
Fixes https://github.com/apple/container/issues/354
2025-07-23 15:59:28 -07:00
Dmitry Kovba f889c1bf76 Use the new @SendablePropertyUnchecked macro (#332)
Changes in this PR require merging
https://github.com/apple/containerization/pull/212 in containerization
and creating a new tag.
2025-07-14 16:57:55 -07:00
Kathryn Baldauf f0d82d2032 Handle when keychain query returns an unhandled error (#331)
Depends on https://github.com/apple/containerization/pull/210
Related to https://github.com/apple/container/issues/254

---------

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-07-14 14:52:12 -07:00
J Logan 7272328cf3 Use swift package edit instead of CONTAINERIZATION_PATH. (#318)
- Closes #294.
2025-07-09 14:06:28 -07:00
Aditya Ramani 4bfa6c29ec Add unpack strategy to SnapshotStore (#274)
Define a `UnpackStrategy` function type in the `SnapshotStore` to give
more control over how an image is unpacked.

Previously, we were creating a 512 GB sparse block file for the initial
file system of a container, which is overkill.

With this change, the vminit image is unpacked to a smaller block file,
while container images are unpacked to the 512 GB block

Follows the same pattern as
https://github.com/apple/container/blob/main/Sources/Helpers/RuntimeLinux/RuntimeLinuxHelper.swift#L71

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2025-07-01 11:22:22 -04: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
Dmitry Kovba 51c1b879d2 Update to Swift 6.2 (#195)
This PR updates to Swift 6.2 and resolves a build error after updating
to Swift 6.2-snapshot in
https://github.com/apple/containerization/pull/94.
2025-06-13 17:27:50 -07:00
Dmitry Kovba 206f3cc07c Improve accuracy of progress updates (#144)
This PR resolves the problem of dropped progress updates and ensures the
accuracy of the information provided in the progress bar. Additionally,
it adds the displaying of the finished state to the progress bar.
Requires merging and tagging
https://github.com/apple/containerization/pull/91.
2025-06-12 23:36:38 -07:00
J Logan 2d262dc0fc Removes build variable that is not needed after launch. (#151) 2025-06-11 13:21:53 -07:00
Aditya Ramani 523cfe4f52 Bump to using Containerization 0.1.0 (#50)
Also update the `container-builder-shim` image to 0.1.0

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2025-06-09 11:18:49 -07:00
Aditya Ramani 33782141fb Bump to using Containerization 0.0.4 (#45)
- Includes updates for setting MTU to 1280
- Also includes bug fixes for LinuxContainer IO streams
2025-06-08 21:34:31 -07:00
Kathryn Baldauf 7523d68251 Update to containerization 0.0.3 (#21)
Update containerization to take new breaking changes
https://github.com/apple/containerization/pull/22

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-06-06 14:39:51 -07:00
Dmitry Kovba 70deb1ba1e Update swift-docc-plugin to fix a non-sendable warning (#8)
This PR resolves warnings:
```
…/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC Preview/Symbolic Links/SwiftDocCPluginUtilities/BuildGraph/DocumentationBuildGraph.swift:106:17: warning: capture of non-sendable type 'Target.Type' in an isolated closure
104 |             // Copy the closure and the target into a block operation object
105 |             let new = BlockOperation { [work, task] in
106 |                 work(task)
    |                 `- warning: capture of non-sendable type 'Target.Type' in an isolated closure
107 |             }
108 |             operationsByID[task.id] = new

…/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC Preview/Symbolic Links/SwiftDocCPluginUtilities/BuildGraph/DocumentationBuildGraph.swift:105:41: warning: capture of non-sendable type 'Target.Type' in an isolated closure
103 |             }
104 |             // Copy the closure and the target into a block operation object
105 |             let new = BlockOperation { [work, task] in
    |                                         `- warning: capture of non-sendable type 'Target.Type' in an isolated closure
106 |                 work(task)
107 |             }
```
2025-06-05 15:52:42 -07:00
Kathryn Baldauf 3a6d7ae676 Cherry pick additional changes (#3)
* Format the codebase (#50)

Signed-off-by: Aditya Ramani <a_ramani@apple.com>

* Update packages before going public (#48)

---------

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
Co-authored-by: Aditya Ramani <a_ramani@apple.com>
Co-authored-by: dkovba <dkovba@apple.com>
2025-06-05 15:52:26 -07:00
Kathryn Baldauf c0fccc0ef6 Update broken test (#2)
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-06-05 15:52:20 -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