-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
103 lines (91 loc) · 2 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
ARG BASE_DISTRO=debian:stable-slim
FROM $BASE_DISTRO
ARG INSTALL_GCC=0
ARG DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
aria2 \
autoconf \
automake \
bc \
bison \
build-essential \
ca-certificates \
ccache \
codespell \
diffstat \
dumb-init \
flex \
gcc \
gettext \
gnupg2 \
gosu \
libcurl4-gnutls-dev \
libelf-dev \
libexpat1-dev \
libgmp-dev \
libmenhir-ocaml-dev \
libmpc-dev \
libparmap-ocaml-dev \
libpcre-ocaml-dev \
libpython3.11 \
libpython3.11-dev \
libsqlite3-dev \
libssl-dev \
libyaml-dev \
libz-dev \
menhir \
ncurses-dev \
ocaml-findlib \
ocaml-native-compilers \
ocaml-nox \
pkg-config \
python-is-python3 \
python3 \
python3-dev \
python3-pip \
python3-ruamel.yaml \
sqlite3 \
swig \
wget \
xz-utils \
yamllint \
&& echo "**** cleanup ****" \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/*
RUN --mount=type=bind,source=build-env.sh,target=/tmp/build-env.sh \
INSTALL_GCC=$INSTALL_GCC /tmp/build-env.sh
# Publish the source repository
LABEL org.opencontainers.image.source https://github.com/nmenon/kernel_patch_verify
# Add our llvm repo configs
COPY llvm-config /
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
llvm \
clang \
lld \
&& echo "**** cleanup ****" \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/*
COPY other-configs/ /
RUN echo "**** create developer user and make our folders ****" \
&& useradd -u 1000 -U -d /config -s /bin/false developer \
&& usermod -G users developer \
&& mkdir /workdir && chown developer:developer /workdir \
&& mkdir /ccache && chown developer:developer /ccache \
&& mkdir /config && chown developer:developer /config
ENTRYPOINT ["/init"]
CMD ["/usr/bin/bash"]
VOLUME /workdir
COPY kernel_patch_verify /usr/bin/kernel_patch_verify
WORKDIR /workdir