Commit Graph

19 Commits

Author SHA1 Message Date
J Logan 3ad0914fd2 Fix CI integration test coldstart issues. (#1230)
- Closes #1206.
- Closes #1185.
- Closes #507.
- Addresses existing log messages for #642.
- Nondeterministic CI errors are resulting from very slow launch times
for the first runtime helper, which causes ContainersService to be
locked for longer than our 20 sec timeout. Bumping the timeout to 60
seconds addresses this case for now.
- Since many log messages needed to be changed to troubleshoot the
issue, updated all log messages to use structured logging, and
implemented consistent entry/exit logging for all service operations.
- Added logging for ContainerService lock acquisition to help with
finding root cause for the slow service startup.
- Plumbed the `--debug` flag on both `container system start` and
`container system logs` so that the flag is actually useful.
- Updated the `install-init.sh` script so that can install in a custom
app root directory.
2026-02-19 09:58:09 -08:00
William Laverty 5c8633703e Add explanatory message before admin password prompt in uninstall script (#1118)
- Added message: "This script requires an administrator password to
remove the application files from system directories."
- Fixes #1111
2026-02-02 13:57:59 -08:00
Patrick Linnane 14c279fcd2 Add option to stop services in all launchd domains (#1077)
- Services started from Terminal run in the `gui/$uid`
  launchd domain. When `ensure-container-stopped.sh`
  runs from a different context, `launchctl managername`
  may return a different domain, causing the script to
  check the wrong domain and miss running services.
  I noticed this after upgrading `container` via Homebrew.
- Introduces a getopt option `-a` that allows booting out all
  domains explicitly. Also adds `-h` for a usage message.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
2026-01-23 17:56:35 -08:00
J Logan b1577d8d07 Adds opt-in pre-commit hook for format and header checks. (#1062)
- Closes #639.
- Adds swift format configuration that removes lint checks so we can use
`swift lint` to perform format-only tests.
- Adds `check` target that invokes format and header checks.
- Adds pre-commit script that runs `make check`.
- Adds `pre-commit` target that installs the check script as a
pre-commit hook.

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

## Motivation and Context
Avoids wasting time and commit rewrites.

## Testing
- [x] Tested locally
- [ ] Added/updated tests
- [x] Added/updated docs
2026-01-16 15:50:47 -08:00
J Logan 356c8d2f88 Reorganize client libraries. (#1020)
- Closes #461.
- Extract core types into ContainerResources target.
- Extract ContainerNetworkServiceClient from ContainerNetworkService.
- Relocate sandbox client from ContainerClient to
ContainerSandboxServiceClient.
- Relocate ContainerClient to ContainerAPIServiceClient.
- Common structure from services and clients under Source/Services.

Updated project hierarchy:

```
Sources/CAuditToken - audit token access wrapper
Sources/CLI - CLI executable
Sources/ContainerBuild - builder
Sources/ContainerCommands - CLI command implementations
Sources/ContainerLog - logging helpers
Sources/ContainerPersistence - persistent data and system property helpers
Sources/ContainerPlugin - plugin system
Sources/ContainerResource - resource (container, image, volume, network) types
Sources/ContainerVersion - version helpers
Sources/ContainerXPC - XPC helpers
Sources/CVersion - injected project version
Sources/DNSServer - container DNS resolver
Sources/Helpers - service executables
Sources/Services/*/Client - service clients
Sources/Services/*/Server - service implementations
Sources/SocketForwarder - port forwarding
Sources/TerminalProgress - progress bar
```

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

## Motivation and Context
The ContainerClient library was a bit of a grab bag. This refactor
applies a more sensible project and library structure for resource data
types, services, and clients.

## Testing
- [x] Tested locally
- [x] Added/updated tests
- [ ] Added/updated docs
2026-01-06 08:27:14 -08:00
Kathryn Baldauf d6f052d206 Update license header on all files to include the current year (#1024)
## Motivation and Context
Now that we're in 2026, we need to update the license headers on all the
files. Unfortunately, Hawkeye doesn't have an attribute for the current
year to help us avoid this in the future. Instead, I had to work around
this by doing the following:

1. Update licenserc.toml with:
     ```
      [properties]
       ... (other properties)
       currentYear = "2026"
     ```
 
2. Update scripts/license-header.txt with
    ```
Copyright ©{{ " " }}{%- set created = attrs.git_file_created_year or
attrs.disk_file_created_year -%}{%- set modified = props["currentYear"]
-%}{%- if created != modified -%} {{created}}-{{modified}}{%- else
-%}{{created}}{%- endif -%}{{ " " }}{{ props["copyrightOwner"] }}.
    ```

Then I removed these two changes before committing. After this PR is
merged, all files will have recently had git updates, so the existing
code for setting the modified year should work as intended.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-01-05 13:09:34 -08:00
Dmitry Kovba 7e4eaddf30 Improvements to Makefile (#822) 2025-10-29 16:41:30 -07:00
GenkaOk d9ca04f553 Update make-docs.sh to prevent HTML errors (#771)
Fix 2 HTML errors:
1) Start tag seen without seeing a doctype first. Expected <!DOCTYPE
html>.
2) Element head is missing a required instance of child element title.
2025-10-16 14:56:48 -07:00
J Logan bfc5ca9222 Removes "all rights reserved" from license header. (#711)
Closes #63.
2025-10-03 13:28:16 -07:00
Kathryn Baldauf 2525d557ef Uninstaller: call usage if incorrect number of options are provided (#556)
This PR improves the user experience when using the uninstall script to
include usage output when an incorrect number of options are provided to
the script.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-08-29 14:19:44 -07:00
J Logan 7272328cf3 Use swift package edit instead of CONTAINERIZATION_PATH. (#318)
- Closes #294.
2025-07-09 14:06:28 -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 65e173333b Redirect to the documentation from the homepage (#245)
This PR fixes the homepage at https://apple.github.io/container/
2025-06-23 10:19:44 -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
Kathryn Baldauf 878ebbda2e Add default year for hawkeye formatting (#180)
This adds a default year to use when a file does not yet have git
attributes (aka for a newly created file).

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
2025-06-13 09:50:05 -07:00
J Logan 6690f6d076 Corrections and refinements for user documentation. (#35) 2025-06-07 21:00:47 -07:00
J Logan bc9865bb81 Removes docc targets we currently do not need. (#27) 2025-06-06 12:08:03 -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