linuxkit pkg: Add config field to build.yml

This is a `moby.ImageConfig` struct which is marshalled into JSON and added as
the `org.mobyproject.config` label on the built image.

Convert `pkg/sysctl` as PoC.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell
2017-11-03 15:19:33 +00:00
parent 3cd02db567
commit 1f6c1a59ca
7 changed files with 37 additions and 11 deletions

View File

@@ -13,4 +13,3 @@ WORKDIR /
COPY --from=mirror /go/bin/sysctl /usr/bin/sysctl
COPY etc/ /etc/
CMD ["/usr/bin/sysctl"]
LABEL org.mobyproject.config='{"pid": "host", "readonly": true, "capabilities": ["CAP_SYS_ADMIN"]}'

View File

@@ -1 +1,6 @@
image: sysctl
config:
pid: "host"
readonly: true
capabilities:
- CAP_SYS_ADMIN