mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
cleanup
This commit is contained in:
parent
450bf1879b
commit
d69fd2c79e
|
@ -4,13 +4,29 @@ MAINTAINER Jessica Frazelle <jess@docker.com>
|
|||
RUN apt-get update && apt-get install -y \
|
||||
ca-certificates \
|
||||
curl \
|
||||
fakeroot \
|
||||
kernel-package \
|
||||
make \
|
||||
libncurses5-dev \
|
||||
--no-install-recommends
|
||||
|
||||
WORKDIR /usr/src
|
||||
ENV HOME /root
|
||||
WORKDIR $HOME
|
||||
|
||||
COPY ./download-kernel /usr/local/bin/download-kernel
|
||||
ENV JOBS 2
|
||||
|
||||
# add install_kernel helper func
|
||||
RUN { \
|
||||
echo '\ninstall_kernel(){'; \
|
||||
echo '\tlocal VERSION=$1'; \
|
||||
echo '\n\tif [[ -z $VERSION ]]; then'; \
|
||||
echo '\t\techo "Please specify a kernel version."'; \
|
||||
echo '\t\texit 1'; \
|
||||
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
|
||||
|
||||
CMD [ "bash" ]
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=$1
|
||||
|
||||
if [[ -z $VERSION ]]; then
|
||||
echo "Please specify a kernel version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -sSL https://www.kernel.org/pub/linux/kernel/v3.x/linux-${VERSION}.tar.xz | tar -v -C /usr/src -xJ
|
Loading…
Reference in New Issue
Block a user