You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move to TOML configuration for defaults (apple#1425)
- Discussion topic apple#1336.
- This change migrates away from using `UserDefaults`,
instead providing a TOML configuration mechanism for
user configurable settings. All existing system property
settings keys are supported in the new configuration
file. However, users will have to migrate any settings
they have configured in the `UserDefaults` into TOML
for these settings to take effect.
- Breaking changes:
* `container system property get` is removed in favor of
users directly utilizing `container system property list --format toml | jq<>`.
* `container system property set` is removed since the TOML
configuration is effectively immutable during the lifetime of the
`container` daemon. Uses can edit the TOML they have in their home
directory, however no changes will take effect until the daemon is
restarted via `container system stop && container system start`
* `container system property list --format table` is removed as
generating tabular format is non-trivial and the new TOML format is
intended to be human readable
Copy file name to clipboardExpand all lines: BUILDING.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,10 +80,11 @@ to prepare your build environment.
80
80
>
81
81
>**Note:** If you have already run `swift package edit`, whether intentionally or by accident, follow the steps in the next section to restore the normal `containerization` dependency. Otherwise, the modified `Package.swift` file will not work, and the project may fail to build.
82
82
83
-
5. If you want `container` to use any changes you made in the `vminit` subproject of Containerization, update the system property to use the locally built init filesystem image:
83
+
5. If you want `container` to use any changes you made in the `vminit` subproject of Containerization, set the init image in your runtime configuration file at `~/.config/container/runtime-config.toml`:
84
84
85
-
```bash
86
-
container system property set image.init vminit:latest
85
+
```toml
86
+
[vminit]
87
+
image = "vminit:latest"
87
88
```
88
89
89
90
6. Build `container`.
@@ -101,11 +102,7 @@ to prepare your build environment.
101
102
102
103
To revert to using the Containerization dependency from your `Package.swift`:
103
104
104
-
1. If you were using the local init filesystem, revert the system property to its default value:
105
-
106
-
```bash
107
-
container system property clear image.init
108
-
```
105
+
1. If you were using the local init filesystem, remove the `init` override from your `~/.config/container/runtime-config.toml` (or delete the `[vminit]` section if no other image settings are present).
109
106
110
107
2. Use the Swift package manager to restore the normal `containerization` dependency and update your `Package.resolved` file. If you are using Xcode, revert your `Package.swift` change instead of using `swift package unedit`.
111
108
@@ -133,14 +130,20 @@ To test changes that require the `container-builder-shim` project:
133
130
134
131
1. Clone the [container-builder-shim](https://github.com/apple/container-builder-shim) repository and navigate to its directory.
135
132
136
-
2. After making the necessary changes, build the custom builder image, set it as the active builder image, and remove the existing `buildkit` container so the new image will be used:
133
+
2. After making the necessary changes, build the custom builder image, set it as the active builder imagein`~/.config/container/runtime-config.toml`, and remove the existing `buildkit` container so the new image will be used:
137
134
138
135
```bash
139
136
container build -t builder .
140
-
container system property set image.builder builder:latest
141
137
container rm -f buildkit
142
138
```
143
139
140
+
Add the following to your `~/.config/container/runtime-config.toml`:
0 commit comments