summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/docker.inc
Commit message (Collapse)AuthorAgeFilesLines
* containers: adapt to UNPACKDIR changesBruce Ashfield2025-06-251-4/+0
| | | | | | | | | | | | | This commit updates the container recipes to the OE core UNPACKDIR changes. - We drop references to WORKDIR - We adjust destsuffix fetches to use BB_GIT_DEFAULT_DESTSUFFIX instead of 'git' - Update our GOPATH references to use UNPACKDIR - Drop S = assignemnts where possible Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* metadata: add whitespace around assignmentsMartin Jansa2025-04-031-1/+1
| | | | | | | | | | With: https://lists.openembedded.org/g/bitbake-devel/message/17508 there are many WARNINGs from this layer will cover src_uri.inc files in next commit. Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: enable docker.service by defaultBruce Ashfield2025-03-131-1/+1
| | | | | | | | | | | | Some platforms are seeing long (2+ minute) start times to get the docker daemon initialized. This doesn't happen when the daemon is started on boot. To avoid this usability issue, we enable both the socket and service automatically. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: switch libnetwork to moby versionPaolo Barbolini2025-01-301-6/+1
| | | | | | | | Some time ago libnetwork was moved from it's own repository to moby. This patch updates the docker recipe to use the new location Signed-off-by: Paolo Barbolini <paolo.barbolini@m4ss.net> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: check for seccomp and ipv6Bruce Ashfield2025-01-171-0/+4
| | | | | | | Without these (and their associated packageconfig options) docker may build, but it won't run correctly. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* moby: adapt SRC_URI to include destsuffix=${GO_SRCURI_DESTSUFFIX}Bruce Ashfield2024-05-291-5/+5
| | | | | | | | | | | As of commit cc4ec43a2b657fb4c58429ab14f1edc2473c1327 [go: Drop fork of unpack code, mandate GO_SRCURI_DESTSUFFIX] we require this variable in our go recipes. We also adjust our paths to the new source location and drop references to WORKDIR. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: remove unnecessary dependenciesChen Qi2023-12-041-16/+1
| | | | | | | | The build is not using the codes from these source packages. Remove the dependencies. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* containers: use VIRTUAL-RUNTIME variable to allow container runtime flexibilityBruce Ashfield2023-03-081-1/+1
| | | | | | | | | Rather than using virtual-runc (which choses between the old docker and opencontainer variants), use the newly added VIRTUAL-RUNTIME_container-runtime variable, which allows switching betwen runc and crun. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker/moby: use generic DOCKER_COMMIT in do_compileBruce Ashfield2022-12-071-2/+2
| | | | | | | | | | do_compile() is shared and shouldn't have been using SRCREV_moby as that is obviously only set in the moby recipe. Switch to using a generic DOCKER_COMMIT variable and set it in both docker_moby and docker-ce. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: add seccomp to default packageconfig settingsBruce Ashfield2022-12-071-1/+1
| | | | | | | Much of meta-virt requires seccomp to function properly, so we update docker to match that common default. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker/proxy: don't use -linkshared unconditionallyJose Quaresma2022-09-201-0/+3
| | | | | | | | | | | | The linkshared is not supported in some machines like riscv64 and when supported we can use the GO_LINKSHARED instaed. So export GO_LINKSHARED on the recipe to be available for Makefile. This is currently only used in libnetwork for the proxy build, but could be used in additional locations in the future. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: ensure that sysvinit and systemd are exclusiveBruce Ashfield2022-08-251-4/+5
| | | | | | | | | | The sysvinit functionality conflicts with the docker daemon settings required for the systemd docker.socket. Ensure that the sysvinit capabilities are only enabled if systemd is not present. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* virtual/containerd: don't rprovide virtual/Bruce Ashfield2021-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the oe-core commit: commit 93ac180d8c389f16964bce8bd5538d9389e970e6 Author: Michael Opdenacker <michael.opdenacker@bootlin.com> Date: Wed Sep 1 11:20:20 2021 +0200 meta: stop using "virtual/" in RPROVIDES and RDEPENDS Fixes [YOCTO #14538] Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS. That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS). Instead, using "virtual-" instead of "virtual/" as already done in the glibc recipe. We stop rproviding virtual/containerd to keep the namespace clean. There aren't many users of this virtual provides, but we keep it around (for now) to maintain compatibility. At the same time we convert the RPROVIDES to virtual-containerd, to keep it available and consistent with oe-core use virtual-libc, etc. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* virtual/runc: don't rprovide virtual/Bruce Ashfield2021-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the oe-core commit: commit 93ac180d8c389f16964bce8bd5538d9389e970e6 Author: Michael Opdenacker <michael.opdenacker@bootlin.com> Date: Wed Sep 1 11:20:20 2021 +0200 meta: stop using "virtual/" in RPROVIDES and RDEPENDS Fixes [YOCTO #14538] Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS. That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS). Instead, using "virtual-" instead of "virtual/" as already done in the glibc recipe. We stop rproviding virtual/runc to keep the namespace clean. There aren't many users of this virtual provides, but we keep it around (for now) to maintain compatibility. At the same time we convert the RPROVIDES to virtual-runc, to keep it available and consistent with oe-core use virtual-libc, etc. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* global: overrides syntax conversionBruce Ashfield2021-08-021-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OEcore/bitbake are moving to use the clearer ":" as an overrides separator. This is pass one of updating the meta-virt recipes to use that syntax. This has only been minimally build/runtime tested, more changes will be required for missed overrides, or incorrect conversions Note: A recent bitbake is required: commit 75fad23fc06c008a03414a1fc288a8614c6af9ca Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Sun Jul 18 12:59:15 2021 +0100 bitbake: data_smart/parse: Allow ':' characters in variable/function names It is becomming increasingly clear we need to find a way to show what is/is not an override in our syntax. We need to do this in a way which is clear to users, readable and in a way we can transition to. The most effective way I've found to this is to use the ":" charater to directly replace "_" where an override is being specified. This includes "append", "prepend" and "remove" which are effectively special override directives. This patch simply adds the character to the parser so bitbake accepts the value but maps it back to "_" internally so there is no behaviour change. This change is simple enough it could potentially be backported to older version of bitbake meaning layers using the new syntax/markup could work with older releases. Even if other no other changes are accepted at this time and we don't backport, it does set us on a path where at some point in future we could require a more explict syntax. I've tested this patch by converting oe-core/meta-yocto to the new syntax for overrides (9000+ changes) and then seeing that builds continue to work with this patch. (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: Fix for sysvinitLeon Anavi2021-07-201-1/+2
| | | | | | | | | Fix for rare legacy systems which still use simultaneously both sysvinit and systemd in DISTRO_FEATURES. This fix avoids issues during do_rootfs with postinstall scriptlets of ['docker-ce']. Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: introduce -clie packageBruce Ashfield2021-04-291-0/+18
| | | | | | | | | | | | | | By the docker-packaging repository and https://docs.docker.com/engine/install/centos/#installation-methods docker is packaged by most distros with a split between the engine and the CLI. We do the same here, by introducing the -cli package But to keep existing use cases working, we also create a RDEPENDS between the main docker package (the engine) and the cli, so existing "docker" package installs will continue to work the same way. To have separate and non-redepending packages created set the DOCKER_UNIFIED_PACKAGE variable to False Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: unify common parts of docker-ce and docker-moby recipesBruce Ashfield2021-04-291-0/+95
| | | | | | | | | | | | | | | | | Now that docker-ce is being built from the same repos as docker-moby, the only unique things in the recipes are the SRCREVs. We move the common packaging, compile/install routines and configuration to the .inc files. We also move the patches to the generic 'files' directory, so they can be shared. If we there are SRCREV bumps in the future that diverge moby and docker, we'll hold patches in their named directorys and tweak the compile/install routines as necessary. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: add more kernel-module RRECOMMENDSBruce Ashfield2020-10-081-1/+1
| | | | | | | The kernel RRECOMMENDS, wasn't complete and in some minimal systems we are missing modules to start dockerd. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: enable docker.socket instead of docker.serviceDan Callaghan2020-06-051-1/+1
| | | | | | | | | The docker daemon supports systemd socket activation. If we enable docker.socket (and not docker.service) then the daemon will be started when it is first used. Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker.inc: Add xt-addrtype kernel moduleNorbert Kaminski2019-12-011-1/+1
| | | | | | | | | | | | | | | | | | | Trying to use docker info and hello world container without this module causes a daemon error. docker info error log: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? dockerd error log: PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables v1.8.3 (legacy): Couldn't load match `addrtype':No such file or directory Signed-off-by: Norbert Kaminski <norbert.kaminski@3mdeb.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: add transient configuration packageconfigMatt Spencer2019-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* docker: rename docker -> docker-moby and introduce virtual/dockerBruce Ashfield2019-09-241-0/+9
| | | | | | | | | | | | | | | | | | The recipe which was providing the default "docker" package was aligned with the moby repositories. In order to make that alignment clear, we rename that recipe docker-moby. To allow easier switching between the docker providing recipes, we introduce a virtual/docker PROVIDES to the common .inc file (and hence each recipe). This allows users to chose what they want via the standard PREFERRED_PROVIDER mechanism. Also to allow existing package lists and image installs to continue to work without changes, we make sure that the implementation specific docker-<foo> packages RPROVIDE docker. If any packages are missed, we'll add them to this list in future updates. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* containers/go/build: don't override global package strip flagsBruce Ashfield2019-07-221-2/+0
| | | | | | | | | | | | | | | | | | When the go-lang container recipes were first created there were issues with strip and the resulting binaries. As such, strip was inhibited for the various packages. This variable is now set in the default classes, and tests show that strip works on the binaries (saving up to 2M on disk for some binaries) with no runtime issues found. So we drop our explicit set of the inhibit and let the build proceed by the defaults. If issues are found, we can re-enable the setting or bbappends can turn it back on for builds showing issues. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: make docker-init a runtime dependency by defaultStefan Agner2019-07-031-1/+2
| | | | | | | | | | | | | | | If docker run --init is used docker expects docker-init to be present, if not Docker fails to start the container with the following error: docker: Error response from daemon: exec: "docker-init": executable file not found in $PATH. However, docker-init does not get deployed by default since commit d19fda374317 ("docker: consolidate common depends/options"). Readd docker-init through a PACKAGECONFIG RDEPENDS to make sure it gets deployed by default again. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
* docker: consolidate common depends/optionsBruce Ashfield2019-03-211-0/+56
The split between docker-ce and docker (moby) was initially quite different, and docker-ce was more of a reference versus a supported / working package. Upstream has evolved such that both are valid options, and may be chosen due to different requirements. Rather than duplicating all the settings, we can move the dependencies, init, rdepends, users, etc, into a .inc file and share them. For now, we keep the build separate, since depending on the uprev status, they still can require different build options and packaging. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>