diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-03-11 23:37:36 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-03-12 00:32:33 -0500 |
| commit | 5c501c8ec8812fbf8027bc9f46ed635ff15d96e6 (patch) | |
| tree | 7679281e5b6c6cdf6625d7fd7385b740737a9730 /recipes-containers/docker/docker_git.bb | |
| parent | c5cd21af5f27309c7926b781852e1ef22940a10d (diff) | |
| download | meta-virtualization-5c501c8ec8812fbf8027bc9f46ed635ff15d96e6.tar.gz | |
docker-registry: provide via docker-distribution
Follow the bouncing docker-registry package. Rather than use the docker hub
registry container, we can have finer grained control if we clone and build
the docker-distribution repository directly.
Since this is distinct from the main docker package/codebase, we break the
registry back out into its own package.
We also create a baseline configuration and .service file that can be the
basis for more complex implementations.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/docker/docker_git.bb')
| -rw-r--r-- | recipes-containers/docker/docker_git.bb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index bad3d866..246fbfeb 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb | |||
| @@ -24,7 +24,6 @@ SRC_URI = "\ | |||
| 24 | git://github.com/docker/docker.git;nobranch=1;name=docker \ | 24 | git://github.com/docker/docker.git;nobranch=1;name=docker \ |
| 25 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \ | 25 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \ |
| 26 | file://docker.init \ | 26 | file://docker.init \ |
| 27 | file://docker-registry.service \ | ||
| 28 | file://hi.Dockerfile \ | 27 | file://hi.Dockerfile \ |
| 29 | file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \ | 28 | file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \ |
| 30 | " | 29 | " |
| @@ -60,7 +59,7 @@ DEPENDS = " \ | |||
| 60 | grpc-go \ | 59 | grpc-go \ |
| 61 | " | 60 | " |
| 62 | 61 | ||
| 63 | PACKAGES =+ "${PN}-contrib ${PN}-registry" | 62 | PACKAGES =+ "${PN}-contrib" |
| 64 | 63 | ||
| 65 | DEPENDS_append_class-target = "lvm2" | 64 | DEPENDS_append_class-target = "lvm2" |
| 66 | RDEPENDS_${PN} = "curl aufs-util git util-linux iptables \ | 65 | RDEPENDS_${PN} = "curl aufs-util git util-linux iptables \ |
| @@ -69,7 +68,7 @@ RDEPENDS_${PN} = "curl aufs-util git util-linux iptables \ | |||
| 69 | RDEPENDS_${PN} += "virtual/containerd virtual/runc" | 68 | RDEPENDS_${PN} += "virtual/containerd virtual/runc" |
| 70 | 69 | ||
| 71 | RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat" | 70 | RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat" |
| 72 | RSUGGESTS_${PN} = "lxc docker-registry rt-tests" | 71 | RSUGGESTS_${PN} = "lxc rt-tests" |
| 73 | DOCKER_PKG="github.com/docker/docker" | 72 | DOCKER_PKG="github.com/docker/docker" |
| 74 | 73 | ||
| 75 | do_configure[noexec] = "1" | 74 | do_configure[noexec] = "1" |
| @@ -136,9 +135,7 @@ inherit systemd update-rc.d | |||
| 136 | 135 | ||
| 137 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 136 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
| 138 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',d)}" | 137 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',d)}" |
| 139 | SYSTEMD_SERVICE_${PN}-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}" | ||
| 140 | 138 | ||
| 141 | SYSTEMD_AUTO_ENABLE_${PN}-registry = "enable" | ||
| 142 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | 139 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
| 143 | 140 | ||
| 144 | INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}" | 141 | INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}" |
| @@ -156,8 +153,6 @@ do_install() { | |||
| 156 | install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system | 153 | install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system |
| 157 | # replaces one copied from above with one that uses the local registry for a mirror | 154 | # replaces one copied from above with one that uses the local registry for a mirror |
| 158 | install -m 644 ${S}/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system | 155 | install -m 644 ${S}/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system |
| 159 | |||
| 160 | install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system | ||
| 161 | else | 156 | else |
| 162 | install -d ${D}${sysconfdir}/init.d | 157 | install -d ${D}${sysconfdir}/init.d |
| 163 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | 158 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init |
| @@ -172,9 +167,6 @@ inherit useradd | |||
| 172 | USERADD_PACKAGES = "${PN}" | 167 | USERADD_PACKAGES = "${PN}" |
| 173 | GROUPADD_PARAM_${PN} = "-r docker" | 168 | GROUPADD_PARAM_${PN} = "-r docker" |
| 174 | 169 | ||
| 175 | FILES_${PN}-registry += "${systemd_unitdir}/system/docker-registry.service" | ||
| 176 | RDEPENDS_${PN}-registry += "docker" | ||
| 177 | |||
| 178 | FILES_${PN} += "${systemd_unitdir}/system/*" | 170 | FILES_${PN} += "${systemd_unitdir}/system/*" |
| 179 | 171 | ||
| 180 | FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" | 172 | FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" |
