de336584d2
Docker upstream has split the Docker daemon and CLI into separate codebases: - github.com/docker/engine: daemon, "dockerd" binary - github.com/docker/cli: "docker" command line interface This commit splits the docker-engine package into docker-engine and docker-cli. Conveniently, the Docker project has begun maintaining two separate release-tagged repositories for the CLI and daemon as of v18.06-ce-rc1. Previous versions were tagged in a common "docker-ce" repository which makes compilation awkward for Buildroot, especially due to some limitations in the new Go package infrastructure. Docker repositories "engine" and "cli" recently started tagging releases. Select the latest stable release, v18.09.0. The CLI is no longer automatically included with the engine. Users will need to select BR2_PACKAGE_DOCKER_CLI to produce a both docker and dockerd target binaries. Docker CLI can be statically compiled. This enables usage of the system docker client binary to access the parent daemon API from within containers, where shared libraries are not available. While at it, drop the useless host-go dependency from docker-engine, since it's already added by the golang-package infrastructure. Signed-off-by: Christian Stewart <christian@paral.in> [Thomas: drop the host-go dependency from both docker-cli and docker-engine] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
81 lines
2.4 KiB
Makefile
81 lines
2.4 KiB
Makefile
################################################################################
|
|
#
|
|
# docker-engine
|
|
#
|
|
################################################################################
|
|
|
|
DOCKER_ENGINE_VERSION = v18.09.0
|
|
DOCKER_ENGINE_SITE = $(call github,docker,engine,$(DOCKER_ENGINE_VERSION))
|
|
|
|
DOCKER_ENGINE_LICENSE = Apache-2.0
|
|
DOCKER_ENGINE_LICENSE_FILES = LICENSE
|
|
|
|
DOCKER_ENGINE_DEPENDENCIES = host-pkgconf
|
|
DOCKER_ENGINE_SRC_SUBDIR = github.com/docker/docker
|
|
|
|
DOCKER_ENGINE_LDFLAGS = \
|
|
-X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
|
|
-X main.Version=$(DOCKER_ENGINE_VERSION)
|
|
|
|
DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen
|
|
DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
|
DOCKER_ENGINE_TAGS += seccomp
|
|
DOCKER_ENGINE_DEPENDENCIES += libseccomp
|
|
endif
|
|
|
|
ifeq ($(BR2_INIT_SYSTEMD),y)
|
|
DOCKER_ENGINE_DEPENDENCIES += systemd
|
|
DOCKER_ENGINE_TAGS += systemd journald
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y)
|
|
DOCKER_ENGINE_TAGS += experimental
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
|
|
DOCKER_ENGINE_DEPENDENCIES += btrfs-progs
|
|
else
|
|
DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
|
|
DOCKER_ENGINE_DEPENDENCIES += lvm2
|
|
else
|
|
DOCKER_ENGINE_TAGS += exclude_graphdriver_devicemapper
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y)
|
|
DOCKER_ENGINE_DEPENDENCIES += gvfs
|
|
else
|
|
DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs
|
|
endif
|
|
|
|
DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
|
|
|
|
define DOCKER_ENGINE_RUN_AUTOGEN
|
|
cd $(@D) && \
|
|
BUILDTIME="$$(date)" \
|
|
VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
|
|
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \
|
|
bash ./hack/make/.go-autogen
|
|
endef
|
|
|
|
DOCKER_ENGINE_POST_CONFIGURE_HOOKS += DOCKER_ENGINE_RUN_AUTOGEN
|
|
|
|
define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
|
|
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/docker.socket
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
|
|
ln -fs ../../../../usr/lib/systemd/system/docker.service \
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
|
|
endef
|
|
|
|
define DOCKER_ENGINE_USERS
|
|
- - docker -1 * - - - Docker Application Container Framework
|
|
endef
|
|
|
|
$(eval $(golang-package))
|