-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new(images): added an ubuntu 5.8-aws clang-7 image.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ARG VERSION=5.8.0-1041-aws | ||
|
||
WORKDIR /home/ubuntu | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
build-essential \ | ||
clang-7 \ | ||
cmake \ | ||
curl \ | ||
dbus \ | ||
git \ | ||
iproute2 \ | ||
iputils-ping \ | ||
kmod \ | ||
libcap-dev \ | ||
libelf-dev \ | ||
linux-headers-${VERSION} \ | ||
linux-tools-${VERSION} \ | ||
llvm \ | ||
net-tools \ | ||
openssh-server \ | ||
rng-tools \ | ||
rsync \ | ||
sudo \ | ||
systemd \ | ||
udev \ | ||
wget && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ | ||
sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ | ||
echo 'UseDNS no' >> /etc/ssh/sshd_config && \ | ||
echo "root:root" | chpasswd && \ | ||
ln -s /usr/bin/clang-7 /usr/bin/clang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM initrd-builder:0.0.1 AS builder | ||
|
||
ARG VERSION=5.8.0-1041-aws | ||
ARG URL='http://security.ubuntu.com/ubuntu/pool/main/l/linux-aws-5.8/' | ||
|
||
WORKDIR /home/ubuntu | ||
|
||
RUN touch .placeholder && \ | ||
curl ${URL} | \ | ||
grep -E "linux-image-${VERSION}|linux-modules-${VERSION}" | \ | ||
cut -d\" -f8 | \ | ||
xargs -I@ curl -LO ${URL}@ && \ | ||
mkdir extracted && \ | ||
ls *deb | \ | ||
xargs -I@ dpkg -x @ extracted && \ | ||
extract-vmlinux extracted/boot/vmlinuz-${VERSION} > extracted/vmlinux && \ | ||
cd extracted && \ | ||
/opt/initrd-builder/create.sh | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /home/ubuntu/extracted/vmlinux /boot/ | ||
COPY --from=builder /home/ubuntu//out/initrd /boot/ | ||
COPY --from=builder /home/ubuntu/.placeholder /lib/modules/ |