From 2685c8cd0ca9454114fb704230ff64358a8d1ab7 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Fri, 6 Jan 2017 17:26:54 +0000 Subject: [PATCH] Do not set WORKDIR in kernel builds This is a temporary workaround for https://github.com/docker/docker/issues/29950 which has broken caching and therefore is very annoying for development, but we don't really need to set it, so it can stay... Signed-off-by: Justin Cormack --- alpine/kernel/Dockerfile | 7 ++++--- alpine/kernel/Dockerfile.aufs | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/alpine/kernel/Dockerfile b/alpine/kernel/Dockerfile index 4df17989b..795b0cf78 100644 --- a/alpine/kernel/Dockerfile +++ b/alpine/kernel/Dockerfile @@ -27,11 +27,12 @@ RUN cd /linux && \ patch -p1 < "$patch"; \ done -WORKDIR /linux -RUN make defconfig && \ +RUN cd /linux && \ + make defconfig && \ make oldconfig && \ make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" -RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \ +RUN cd /linux && \ + make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \ ( DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \ cd /tmp/kernel-modules/lib/modules/$DVER && \ rm build source && \ diff --git a/alpine/kernel/Dockerfile.aufs b/alpine/kernel/Dockerfile.aufs index 707ea9347..10fd74c4c 100644 --- a/alpine/kernel/Dockerfile.aufs +++ b/alpine/kernel/Dockerfile.aufs @@ -65,11 +65,12 @@ RUN cd /linux && \ patch -p1 < "$patch"; \ done -WORKDIR /linux -RUN make defconfig && \ +RUN cd /linux && \ + make defconfig && \ make oldconfig && \ make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" -RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \ +RUN cd /linux && \ + make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \ ( DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \ cd /tmp/kernel-modules/lib/modules/$DVER && \ rm build source && \