mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-05-14 16:42:55 +00:00
kernel: Pass kernel version as build-arg to docker
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
@@ -3,16 +3,19 @@ DEBUG ?= 0
|
||||
all: bzImage push
|
||||
|
||||
ifdef AUFS
|
||||
KERNEL_VERSION=4.9.14
|
||||
DEPS=Dockerfile.aufs Makefile kernel_config kernel_config.debug kernel_config.aufs patches-4.9
|
||||
else
|
||||
ifdef LTS4.4
|
||||
KERNEL_VERSION=4.4.53
|
||||
DEPS=Dockerfile.4.4 Makefile kernel_config kernel_config.debug kernel_config.4.4 patches-4.4
|
||||
else
|
||||
KERNEL_VERSION=4.9.14
|
||||
DEPS=Dockerfile Makefile kernel_config kernel_config.debug patches-4.9
|
||||
endif
|
||||
endif
|
||||
kernel.tag: $(DEPS)
|
||||
BUILD=$$( tar cf - $^ | docker build -f $< --build-arg DEBUG=$(DEBUG) -q - ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && echo "$$BUILD" > $@
|
||||
BUILD=$$( tar cf - $^ | docker build -f $< --build-arg DEBUG=$(DEBUG) --build-arg KERNEL_VERSION=$(KERNEL_VERSION) -q - ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && echo "$$BUILD" > $@
|
||||
|
||||
bzImage: kernel.tag
|
||||
rm -rf etc/kernel-patches
|
||||
|
||||
Reference in New Issue
Block a user