Split linuxkit run -data options into string and file

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2018-01-15 14:56:40 +02:00
parent 62d4858a3e
commit 6c015141f5
6 changed files with 40 additions and 23 deletions

View File

@@ -55,19 +55,22 @@ The JSON file consists of a map from `name` to an entry object. Each entry objec
- `entries`: if present then the entry is a directory. The value is a map from `name` to entry objects.
- `perm`: the permissions to create the file with.
The `content` and `entries` fields are mutually exclusive, it is an error to include both,
one or the other _must_ be present.
The `content` and `entries` fields are mutually exclusive, it is an error to include both,
one or the other _must_ be present.
The file or directory's name in each case is the same as the key which referred to that entry.
This hierarchy can then be used by individual containers, who can bind
mount the config sub-directory into their namespace where it is
needed.
# Metadata image creation
Run `linuxkit run` backends accept a `-data=STRING` option which will
cause the given string to be passed to the VM in a platform specific
manner to be picked up by the `pkg/metadata` component.
`linuxkit run` backends accept two options to pass metadata to the VM in a platform specific
manner to be picked up by the `pkg/metadata` component:
* `-data=STRING` will cause the given `STRING` to be passed to the VM
* `-data-file=PATH` will cause the contents of the file at `PATH` to be passed to the VM
Alternatively `linuxkit metadata create meta.iso STRING` will produce
a correctly formatted ISO image which can be passed to a VM as a CDROM

View File

@@ -166,7 +166,7 @@ there are a number of packages, such as `vsudd`, which enable
tighter integration of the VM with the host (see below).
The HyperKit backend also allows passing custom userdata into the
[metadata package](./metadata.md) using the `-data` command-line
[metadata package](./metadata.md) using either the `-data` or `-data-file` command-line
option. This attaches a CD device with the data on.