2016-07-24 23:10:28 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# docker-engine
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2019-05-06 21:19:01 +02:00
|
|
|
DOCKER_ENGINE_VERSION = v18.09.6
|
2018-11-27 09:56:55 +01:00
|
|
|
DOCKER_ENGINE_SITE = $(call github,docker,engine,$(DOCKER_ENGINE_VERSION))
|
2016-07-24 23:10:28 +02:00
|
|
|
|
|
|
|
DOCKER_ENGINE_LICENSE = Apache-2.0
|
|
|
|
DOCKER_ENGINE_LICENSE_FILES = LICENSE
|
|
|
|
|
2018-11-27 09:56:55 +01:00
|
|
|
DOCKER_ENGINE_DEPENDENCIES = host-pkgconf
|
|
|
|
DOCKER_ENGINE_SRC_SUBDIR = github.com/docker/docker
|
2016-07-24 23:10:28 +02:00
|
|
|
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_LDFLAGS = \
|
2016-07-24 23:10:28 +02:00
|
|
|
-X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
|
|
|
|
-X main.Version=$(DOCKER_ENGINE_VERSION)
|
|
|
|
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen
|
2018-11-27 09:56:55 +01:00
|
|
|
DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd
|
2016-07-24 23:10:28 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_TAGS += seccomp
|
2016-07-24 23:10:28 +02:00
|
|
|
DOCKER_ENGINE_DEPENDENCIES += libseccomp
|
|
|
|
endif
|
|
|
|
|
2017-05-30 05:50:04 +02:00
|
|
|
ifeq ($(BR2_INIT_SYSTEMD),y)
|
|
|
|
DOCKER_ENGINE_DEPENDENCIES += systemd
|
2018-11-27 09:56:55 +01:00
|
|
|
DOCKER_ENGINE_TAGS += systemd journald
|
2017-05-30 05:50:04 +02:00
|
|
|
endif
|
2016-07-24 23:10:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y)
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_TAGS += experimental
|
2016-07-24 23:10:28 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
|
|
|
|
DOCKER_ENGINE_DEPENDENCIES += btrfs-progs
|
|
|
|
else
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
|
2016-07-24 23:10:28 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
|
|
|
|
DOCKER_ENGINE_DEPENDENCIES += lvm2
|
|
|
|
else
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_TAGS += exclude_graphdriver_devicemapper
|
2016-07-24 23:10:28 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y)
|
|
|
|
DOCKER_ENGINE_DEPENDENCIES += gvfs
|
|
|
|
else
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs
|
2016-07-24 23:10:28 +02:00
|
|
|
endif
|
|
|
|
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
|
|
|
|
|
|
|
|
define DOCKER_ENGINE_RUN_AUTOGEN
|
2016-07-24 23:10:28 +02:00
|
|
|
cd $(@D) && \
|
2016-12-24 07:02:46 +01:00
|
|
|
BUILDTIME="$$(date)" \
|
|
|
|
VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
|
2016-12-14 23:39:43 +01:00
|
|
|
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \
|
2016-07-24 23:10:28 +02:00
|
|
|
bash ./hack/make/.go-autogen
|
|
|
|
endef
|
|
|
|
|
2018-03-07 23:19:38 +01:00
|
|
|
DOCKER_ENGINE_POST_CONFIGURE_HOOKS += DOCKER_ENGINE_RUN_AUTOGEN
|
|
|
|
|
2016-07-24 23:10:28 +02:00
|
|
|
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
|
|
|
|
|
2019-01-30 23:28:09 +01:00
|
|
|
define DOCKER_ENGINE_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 755 package/docker-engine/S60dockerd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S60dockerd
|
|
|
|
endef
|
|
|
|
|
2016-07-24 23:10:28 +02:00
|
|
|
define DOCKER_ENGINE_USERS
|
|
|
|
- - docker -1 * - - - Docker Application Container Framework
|
|
|
|
endef
|
|
|
|
|
2018-03-07 23:19:38 +01:00
|
|
|
$(eval $(golang-package))
|