@@ -144,8 +144,7 @@ create:
144144| create.with\_ clean | Clean up unused layers before creating rootfs |
145145| create.uid_mappings | UID mapping for image translation, e.g.: \< Namespace UID\> :\< Host UID\> :\< Size\> |
146146| create.gid_mappings | GID mapping for image translation, e.g.: \< Namespace GID\> :\< Host GID\> :\< Size\> |
147- | create.json | Format the output as JSON |
148- | create.without_mount | Don't perform the rootfs mount and return the mount information in the json output. Only usable with --json. |
147+ | create.without_mount | Don't perform the rootfs mount. |
149148| clean.ignore\_ images | Images to ignore during cleanup |
150149| clean.threshold\_ bytes | Disk usage of the store directory at which cleanup should trigger |
151150
@@ -198,35 +197,22 @@ grootfs --store /mnt/btrfs create /my-rootfs.tar my-image-id
198197
199198#### Output
200199
201- The output of this command is the image path
202- (` /mnt/btrfs/images/<uid>/my-image-id ` ) which has the following structure:
203-
204- * The ` <uid> ` is the effective user id running the command.
200+ The output of this command is a json object which has the following structure:
205201
206202```
207- <Returned directory>
208- |____ rootfs/
209- |____ image.json
203+ {
204+ "rootfs": "...", # complete path to the image rootfs, which lives in <image-path>/rootfs
205+ "config": {...}, # contents of image config, also writen to <image-path>/image.json
206+ }
210207```
211208
212- * The ` rootfs ` folder is where the root filesystem lives.
213- * The ` image.json ` file follows the [ OCI image
209+ * The ` <image-path>/ rootfs` folder is where the root filesystem lives.
210+ * The ` <image-path>/ image.json` file follows the [ OCI image
214211 description] ( https://github.com/opencontainers/image-spec/blob/master/serialization.md#image-json-description )
215212 schema.
216213
217- ##### JSON
218-
219- When create is provided with a ` --json ` flag, it will print the output as json.
220- The json will contain:
221-
222- ```
223- {
224- "rootfs": "...", # complete path to the image rootfs
225- "config": {...}, # contents of image config, also writen to <image-path>/image.json
226- }
227- ```
228214
229- If ` --without-mount ` flag is provided (or ` create.without_mount = true ` in config),
215+ If the ` --without-mount ` flag is provided (or ` create.without_mount = true ` in config),
230216the json output will also contain the ` mount ` key:
231217
232218```
@@ -240,11 +226,10 @@ the json output will also contain the `mount` key:
240226 ...
241227```
242228
243- Special notes about ` --without-mount ` /` create.without_mount ` :
229+ The ` --without-mount ` option exists so that GrootFS can be run as non-root. The mount information is compatible
230+ with [ OCI container spec] ( https://github.com/opencontainers/runtime-spec/blob/master/config.md#example-linux ) .
231+
244232
245- * It can only be used in combination with the ` --json ` (or ` create.json ` in config) option
246- * This option exists so that GrootFS can be run as non-root. The mount information
247- is compatible with [ OCI container spec] ( https://github.com/opencontainers/runtime-spec/blob/master/config.md#example-linux ) .
248233
249234#### User/Group ID Mapping
250235
0 commit comments