mirror of
https://github.com/rancher/os.git
synced 2025-07-18 00:51:04 +00:00
move the kernel headers and extras images to os repo
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
100d85149f
commit
d65f376ed9
5
images/10-extras/Dockerfile
Normal file
5
images/10-extras/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM alpine:3.4
|
||||
# FROM arm64=skip arm=skip
|
||||
RUN apk --purge --no-cache add kmod bash openssl
|
||||
COPY extra.sh /usr/bin
|
||||
CMD ["extra.sh"]
|
19
images/10-extras/extra.sh
Executable file
19
images/10-extras/extra.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
DIR=$(readlink /lib/modules/$(uname -r)/build)
|
||||
STAMP=/lib/modules/$(uname -r)/.extra-done
|
||||
VER=$(basename $DIR)
|
||||
URL=${KERNEL_EXTRAS_URL:-https://github.com/rancher/os-kernel/releases/download/${VER}/extra.tar.gz}
|
||||
|
||||
if [ -e $STAMP ]; then
|
||||
echo Kernel extras already installed. Delete $STAMP to reinstall
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo Downloading $URL
|
||||
wget -O - $URL | gzip -dc | tar xf - -C /
|
||||
depmod -a
|
||||
touch $STAMP
|
||||
|
||||
echo Kernel extras installed
|
3
images/10-headers/Dockerfile
Normal file
3
images/10-headers/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM rancher/os-base
|
||||
COPY headers.sh /
|
||||
CMD ["/headers.sh"]
|
24
images/10-headers/headers.sh
Executable file
24
images/10-headers/headers.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
DIR=$(readlink /lib/modules/$(uname -r)/build)
|
||||
STAMP=${DIR}/.done
|
||||
VER=$(basename $DIR)
|
||||
|
||||
if [ "$VER" = "Ubuntu-4.4.0-23.41-rancher2" ]; then
|
||||
VER=Ubuntu-4.4.0-23.41-rancher2-2
|
||||
fi
|
||||
|
||||
KERNEL_HEADERS_URL=${KERNEL_HEADERS_URL:-https://github.com/rancher/os-kernel/releases/download/${VER}/build.tar.gz}
|
||||
|
||||
if [ -e $STAMP ]; then
|
||||
echo Headers already installed in $DIR
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo Downloading $KERNEL_HEADERS_URL
|
||||
mkdir -p $DIR
|
||||
wget -O - $KERNEL_HEADERS_URL | gzip -dc | tar xf - -C $DIR
|
||||
touch $STAMP
|
||||
|
||||
echo Headers installed at $DIR
|
Loading…
Reference in New Issue
Block a user