diff options
author | Matt Spencer <matthew@thespencers.me.uk> | 2019-08-28 17:23:36 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-09-24 20:36:00 -0400 |
commit | 150f1857bba2df9dc4b78f08bd93603a18192b0a (patch) | |
tree | f4f0bfda9c3c8cbdd58164c4eaf06c1b29990b14 | |
parent | 7e2c4151c53463140bcb8f6bc5b2b27cbbf6dff8 (diff) | |
download | meta-virtualization-150f1857bba2df9dc4b78f08bd93603a18192b0a.tar.gz |
docker: add transient configuration packageconfig
Since commit:
[
Author: Tom Rini <trini@konsulko.com>
Date: Fri Feb 8 13:22:35 2019 -0500
docker: Move /etc/docker to a symlink to volatiles
The only thing which docker uses /etc/docker for is a TLS key for
connecting with other TLS-enabled services. Make /etc/docker a symlink
to the existing docker volatiles directory so that we can use docker on
a read-only rootfs.
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]
We've had a transient / volatile docker configuration since we point
our /etc configuration to /run. This is not always a good thing if
a static configuration for keys, etc, is desired.
We maintain this functionality under the 'transient-config'
PACKAGECONFIG, and also allow the existing static/permanent config
to be used.
Signed-off-by: Matt Spencer <matthew@thespencers.me.uk>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/docker/docker-ce_git.bb | 8 | ||||
-rw-r--r-- | recipes-containers/docker/docker-moby.bb | 8 | ||||
-rw-r--r-- | recipes-containers/docker/docker.inc | 1 |
3 files changed, 13 insertions, 4 deletions
diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb index 52b146d2..817795f0 100644 --- a/recipes-containers/docker/docker-ce_git.bb +++ b/recipes-containers/docker/docker-ce_git.bb | |||
@@ -112,8 +112,12 @@ do_install() { | |||
112 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | 112 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init |
113 | fi | 113 | fi |
114 | # TLS key that docker creates at run-time if not found is what resides here | 114 | # TLS key that docker creates at run-time if not found is what resides here |
115 | install -d ${D}${sysconfdir} | 115 | if ${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then |
116 | ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker | 116 | install -d ${D}${sysconfdir} |
117 | ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker | ||
118 | else | ||
119 | install -d ${D}${sysconfdir}/docker | ||
120 | fi | ||
117 | 121 | ||
118 | mkdir -p ${D}${datadir}/docker/ | 122 | mkdir -p ${D}${datadir}/docker/ |
119 | install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/ | 123 | install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/ |
diff --git a/recipes-containers/docker/docker-moby.bb b/recipes-containers/docker/docker-moby.bb index e45f87e0..2ba1d276 100644 --- a/recipes-containers/docker/docker-moby.bb +++ b/recipes-containers/docker/docker-moby.bb | |||
@@ -132,8 +132,12 @@ do_install() { | |||
132 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | 132 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init |
133 | fi | 133 | fi |
134 | # TLS key that docker creates at run-time if not found is what resides here | 134 | # TLS key that docker creates at run-time if not found is what resides here |
135 | install -d ${D}${sysconfdir} | 135 | if ${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then |
136 | ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker | 136 | install -d ${D}${sysconfdir} |
137 | ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker | ||
138 | else | ||
139 | install -d ${D}${sysconfdir}/docker | ||
140 | fi | ||
137 | 141 | ||
138 | mkdir -p ${D}${datadir}/docker/ | 142 | mkdir -p ${D}${datadir}/docker/ |
139 | install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ | 143 | install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ |
diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc index 8b1b123c..0083902f 100644 --- a/recipes-containers/docker/docker.inc +++ b/recipes-containers/docker/docker.inc | |||
@@ -44,6 +44,7 @@ inherit pkgconfig | |||
44 | PACKAGECONFIG ??= "docker-init" | 44 | PACKAGECONFIG ??= "docker-init" |
45 | PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" | 45 | PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" |
46 | PACKAGECONFIG[docker-init] = ",,,docker-init" | 46 | PACKAGECONFIG[docker-init] = ",,,docker-init" |
47 | PACKAGECONFIG[transient-config] = "transient-config" | ||
47 | 48 | ||
48 | inherit systemd update-rc.d | 49 | inherit systemd update-rc.d |
49 | 50 | ||