-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile
More file actions
136 lines (119 loc) · 2.69 KB
/
Dockerfile
File metadata and controls
136 lines (119 loc) · 2.69 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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 \
curl \
gettext \
gnupg2 \
gosu \
libcurl4-gnutls-dev \
libelf-dev \
libexpat1-dev \
libgmp-dev \
libmpc-dev \
libpython3.13 \
libpython3.13-dev \
libsqlite3-dev \
libssl-dev \
libstdc++6 \
libgcc-s1 \
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-venv \
python3-ruamel.yaml \
protobuf-compiler \
libprotobuf-dev \
ripgrep \
sqlite3 \
swig \
wget \
xz-utils \
yamllint \
kmod \
pixz \
coccinelle \
&& echo "**** cleanup ****" \
&& apt-get autoremove -y\
&& apt-get clean -y\
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/*
RUN python3 -m venv /usr/local/venv
RUN . /usr/local/venv/bin/activate
# Add our llvm repo configs
COPY llvm-config /
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
llvm \
clang \
clangd \
libclang-dev \
lld \
llvm-dev \
&& apt-get autoremove -y\
&& apt-get clean -y\
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/*
COPY other-configs/tmp /tmp
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
# Install patchwise dependencies
RUN apt-get update \
&& . /usr/local/venv/bin/activate \
&& patchwise --install \
&& echo "**** cleanup ****" \
&& apt-get autoremove -y\
&& apt-get clean -y\
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/*
COPY other-configs/ /
# HACK for codespell path change in trixie
RUN mkdir -p /usr/share/codespell \
&& ln -s /usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt /usr/share/codespell/dictionary.txt
# Install developer user and folders
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 -R developer:developer /workdir \
&& mkdir /ccache && chown -R developer:developer /ccache \
&& mkdir -p /config && chown -R developer:developer /config
ENTRYPOINT ["/init"]
CMD ["/usr/bin/bash"]
VOLUME /workdir
COPY kernel_patch_verify /usr/bin/kernel_patch_verify
WORKDIR /workdir