-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
51 lines (43 loc) · 1.16 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ARG BUILD_DISTRO=bookworm
FROM debian:$BUILD_DISTRO
ARG UID=1000
ARG GID=1000
ARG USERNAME=securedrop
ENV KBUILD_BUILD_USER "$USERNAME"
ENV KBUILD_BUILD_HOST "freedom.press"
ENV DEBFULLNAME "SecureDrop Team"
RUN apt-get update && \
apt-get install -y \
bc \
bison \
build-essential \
cpio \
debhelper \
fakeroot \
flex \
git \
kmod \
libelf-dev \
liblz4-tool \
libssl-dev \
ncurses-dev \
python3 \
python3-jinja2 \
python3-requests \
rsync \
wget \
xz-utils
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657962, there's no
# unversioned name for this package
RUN apt-get install --yes gcc-$(gcc -dumpversion)-plugin-dev
RUN groupadd -g ${GID} ${USERNAME} && useradd -m -d /home/${USERNAME} -g ${GID} -u ${UID} ${USERNAME}
COPY build-kernel.py /usr/local/bin/build-kernel.py
COPY grsecurity-urls.py /usr/local/bin/grsecurity-urls.py
COPY debian /debian
COPY pubkeys/ /pubkeys
RUN mkdir -p -m 0755 /kernel /patches-grsec /output
RUN chown ${USERNAME}:${USERNAME} /kernel /patches-grsec /output
WORKDIR /kernel
# VOLUME ["/kernel"]
USER ${USERNAME}
CMD ["/usr/local/bin/build-kernel.py"]