Build: Update buildroot 2018-11.1 (#300)

* Build: Update buildroot 2018-11.1

* Add cli to image
This commit is contained in:
Pascal Vizeli
2018-12-31 02:32:21 +01:00
committed by GitHub
parent 8810b0409c
commit f7eb215016
84 changed files with 985 additions and 341 deletions

View File

@@ -5,25 +5,20 @@
################################################################################
DOCKER_ENGINE_VERSION = v18.09.0
DOCKER_ENGINE_SITE = $(call github,docker,docker-ce,$(DOCKER_ENGINE_VERSION))
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-go host-pkgconf
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) \
-X github.com/docker/cli/cli.GitCommit=$(DOCKER_ENGINE_VERSION) \
-X github.com/docker/cli/cli.Version=$(DOCKER_ENGINE_VERSION)
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT),y)
DOCKER_ENGINE_LDFLAGS += -extldflags '-static'
endif
-X main.Version=$(DOCKER_ENGINE_VERSION)
DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen apparmor
DOCKER_ENGINE_BUILD_TARGETS = docker
DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
DOCKER_ENGINE_TAGS += seccomp
@@ -31,15 +26,9 @@ DOCKER_ENGINE_DEPENDENCIES += libseccomp
endif
ifeq ($(BR2_INIT_SYSTEMD),y)
DOCKER_ENGINE_TAGS += journald
DOCKER_ENGINE_DEPENDENCIES += systemd
DOCKER_ENGINE_TAGS += systemd journald
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
DOCKER_ENGINE_TAGS += daemon
DOCKER_ENGINE_BUILD_TARGETS += dockerd
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y)
DOCKER_ENGINE_TAGS += experimental
endif
@@ -62,26 +51,22 @@ else
DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs
endif
DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
define DOCKER_ENGINE_RUN_AUTOGEN
ln -fs $(@D)/components/engine $(@D)/_gopath/src/github.com/docker/docker
ln -fs $(@D)/components/cli $(@D)/_gopath/src/github.com/docker/cli
cd $(@D)/components/engine && \
cd $(@D) && \
BUILDTIME="$$(date)" \
IAMSTATIC="true" \
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
DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/components/engine/contrib/init/systemd/docker.service \
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
$(INSTALL) -D -m 0644 $(@D)/components/engine/contrib/init/systemd/docker.socket \
$(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 \
@@ -92,24 +77,4 @@ define DOCKER_ENGINE_USERS
- - docker -1 * - - - Docker Application Container Framework
endef
endif
define DOCKER_ENGINE_BUILD_CMDS
$(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
cd $(@D)/$(DOCKER_ENGINE_WORKSPACE)/src/github.com/docker/$(if $(filter $(target),dockerd),docker,cli); \
$(GO_TARGET_ENV) \
GOPATH="$(@D)/$(DOCKER_ENGINE_WORKSPACE)" \
$(DOCKER_ENGINE_GO_ENV) \
$(GO_BIN) build -v $(DOCKER_ENGINE_BUILD_OPTS) \
-o $(@D)/bin/$(target) \
./cmd/$(target)
)
endef
define DOCKER_ENGINE_INSTALL_SYMLINKS
ln -fs tini $(TARGET_DIR)/usr/bin/docker-init
endef
DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INSTALL_SYMLINKS
$(eval $(golang-package))