-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
42 lines (36 loc) · 973 Bytes
/
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
FROM debian:buster-20200803-slim
LABEL maintainer="[email protected]"
# Internal user who will build the kernel
ARG user=builder
# Install Git and the build dependencies
# hadolint ignore=DL3008
RUN apt-get update -qq -y && apt-get install --no-install-recommends -qq -y \
apt-transport-https \
bc \
bison \
build-essential \
ca-certificates \
cpio \
dpkg-dev \
fakeroot \
flex \
git \
kmod \
libssl-dev \
libc6-dev \
libncurses5-dev \
make \
rsync \
&& update-ca-certificates \
&& apt-get -y autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
# Create user and set work directory
RUN useradd -m $user
USER $user
WORKDIR /home/$user
# Copy script that builds the kernel
COPY --chown=$user:$user build-kernel.sh .
RUN chmod +x build-kernel.sh
ENTRYPOINT ["bash", "build-kernel.sh"]
CMD ["--help"]