-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (29 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM archlinux/base:latest
RUN pacman -Sy && pacman --noconfirm -S asp base-devel pacman-contrib
RUN useradd --shell=/bin/false build && usermod -L build
RUN echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER build
WORKDIR /home/build
CMD /bin/bash -l
RUN sudo chown -R build:build /home/build
RUN sudo chmod -R 777 /home/build
WORKDIR /home/build/
RUN asp update linux && asp checkout linux
ADD config/kernel-config /home/build/linux/trunk/config
WORKDIR /home/build/linux/trunk
RUN ls
RUN sed -i '/#pkgbase=linux-custom/c\' PKGBUILD
RUN sed -i '/pkgbase=linux/c\pkgbase=linux-firecracker' PKGBUILD
RUN updpkgsums
RUN MAKEFLAGS="-j$(nproc)" makepkg --noconfirm --skippgpcheck -s
RUN sudo pacman -S --noconfirm arch-install-scripts
WORKDIR /
VOLUME [ "/output", "/rootfs" ]
RUN sudo mkdir /script
RUN sudo chmod -R 777 /script
WORKDIR /script
RUN echo " downloading latest scripts from github "
RUN sudo curl -O https://raw.githubusercontent.com/hatf0/arch-firecracker/master/script/image.sh
RUN sudo curl -O https://raw.githubusercontent.com/hatf0/arch-firecracker/master/script/provision.sh
CMD [ "/bin/bash", "/script/image.sh" ]