2014-12-01 22:31:45 +01:00
|
|
|
FROM debian:jessie
|
|
|
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2015-06-05 19:24:11 +02:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
kernel-package \
|
|
|
|
make \
|
|
|
|
libncurses5-dev \
|
|
|
|
--no-install-recommends
|
2014-12-01 22:31:45 +01:00
|
|
|
|
2015-04-15 23:07:02 +02:00
|
|
|
ENV HOME /root
|
|
|
|
WORKDIR $HOME
|
2014-12-01 22:31:45 +01:00
|
|
|
|
2015-06-05 20:55:25 +02:00
|
|
|
ENV JOBS 4
|
2015-04-15 23:07:02 +02:00
|
|
|
|
|
|
|
# add install_kernel helper func
|
|
|
|
RUN { \
|
2015-06-05 19:24:11 +02:00
|
|
|
echo '\ninstall_kernel(){'; \
|
|
|
|
echo '\tlocal VERSION=$1'; \
|
|
|
|
echo '\n\tif [[ -z $VERSION ]]; then'; \
|
|
|
|
echo '\t\techo "Please specify a kernel version."'; \
|
2015-06-06 03:13:42 +02:00
|
|
|
echo '\t\treturn 1'; \
|
2015-06-05 19:24:11 +02:00
|
|
|
echo '\tfi\n'; \
|
|
|
|
echo '\tlocal MAJOR_VERSION=${VERSION:0:1}'; \
|
|
|
|
echo '\n\t[ -d /usr/src/linux-${VERSION} ] || curl -sSL https://www.kernel.org/pub/linux/kernel/v${MAJOR_VERSION}.x/linux-${VERSION}.tar.xz | tar -v -C /usr/src -xJ'; \
|
|
|
|
echo '\n\tcd /usr/src/linux-${VERSION}'; \
|
|
|
|
echo '\n\tnice -19 make -j$JOBS KDEB_PKGVERSION=$PKGVERSION INSTALL_MOD_STRIP=1 deb-pkg'; \
|
|
|
|
echo '}'; \
|
|
|
|
} >> ~/.bashrc
|
2015-02-06 21:57:15 +01:00
|
|
|
|
|
|
|
CMD [ "bash" ]
|