2021-10-19 21:35:05 +02:00
|
|
|
# syntax=docker/dockerfile:1.3
|
2022-05-16 16:24:52 +02:00
|
|
|
FROM registry.fedoraproject.org/fedora-minimal:36
|
2021-05-05 21:51:42 +02:00
|
|
|
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG VCS_REF
|
|
|
|
|
2022-10-10 16:34:01 +02:00
|
|
|
# as per https://github.com/opencontainers/image-spec/blob/main/annotations.md,
|
|
|
|
# keep Label Schema labels for backward compatibility.
|
|
|
|
LABEL description="Container image mainly used for CI testing of C/C++ programs on Fedora" \
|
|
|
|
org.label-schema.build-date=$BUILD_DATE \
|
2021-05-05 21:51:42 +02:00
|
|
|
org.label-schema.vcs-url="https://git.dotya.ml/wanderer/docker-fedora-cpp.git" \
|
|
|
|
org.label-schema.vcs-ref=$VCS_REF \
|
2022-10-10 16:34:01 +02:00
|
|
|
org.label-schema.license=GPL-3.0 \
|
|
|
|
org.opencontainers.image.title="docker-fedora-cpp" \
|
|
|
|
org.opencontainers.image.description="Container image mainly used for CI testing of C/C++ programs on Fedora" \
|
|
|
|
org.opencontainers.image.created=$BUILD_DATE \
|
|
|
|
org.opencontainers.image.authors=wanderer \
|
|
|
|
org.opencontainers.image.url="https://git.dotya.ml/wanderer/docker-fedora-cpp.git" \
|
|
|
|
org.opencontainers.image.source="https://git.dotya.ml/wanderer/docker-fedora-cpp.git" \
|
|
|
|
org.opencontainers.image.revision=$VCS_REF \
|
|
|
|
org.opencontainers.image.licenses=GPL-3.0
|
2021-05-05 21:51:42 +02:00
|
|
|
|
2021-08-13 03:28:55 +02:00
|
|
|
RUN printf "[main]\ngpg_check=1\ninstallonly_limit=2\nclean_requirements_on_remove=True\nfastestmirror=True\nmax_parallel_downloads=7\n" > /etc/dnf/dnf.conf; \
|
2021-10-21 01:42:13 +02:00
|
|
|
cat /etc/dnf/dnf.conf; \
|
2022-03-24 17:56:35 +01:00
|
|
|
\
|
|
|
|
microdnf --refresh upgrade -y && \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
microdnf install --nodocs dnf dnf-plugins-core -y && \
|
2022-01-07 18:28:47 +01:00
|
|
|
dnf copr enable eddsalkield/iwyu -y && \
|
|
|
|
microdnf install --nodocs --setopt install_weak_deps=0 -y \
|
2021-05-05 21:51:42 +02:00
|
|
|
git \
|
2021-10-19 23:45:41 +02:00
|
|
|
ninja-build \
|
2021-05-05 21:51:42 +02:00
|
|
|
make \
|
|
|
|
{c,auto}make \
|
|
|
|
gcc \
|
|
|
|
gcc-c++ \
|
|
|
|
libgcc \
|
|
|
|
libstdc++-{devel,static} \
|
|
|
|
glibc-devel \
|
2022-01-07 18:28:47 +01:00
|
|
|
iwyu \
|
2021-11-11 02:49:10 +01:00
|
|
|
cryptopp-devel \
|
2021-11-28 16:37:19 +01:00
|
|
|
libasan-static \
|
|
|
|
liblsan-static \
|
|
|
|
libubsan-static \
|
2022-01-10 01:24:18 +01:00
|
|
|
libtsan-static \
|
2021-05-05 21:51:42 +02:00
|
|
|
binutils \
|
2021-11-01 08:42:43 +01:00
|
|
|
lld \
|
2021-05-05 21:51:42 +02:00
|
|
|
flex \
|
|
|
|
bison \
|
|
|
|
openmpi-devel \
|
|
|
|
which \
|
|
|
|
file \
|
|
|
|
grpc-{cli,cpp,devel,plugins} \
|
|
|
|
protobuf-c-{devel,compiler} \
|
|
|
|
protobuf-compiler \
|
|
|
|
cppunit \
|
|
|
|
log4cpp-devel \
|
|
|
|
json-c-devel \
|
|
|
|
capnproto-{devel,libs} \
|
|
|
|
libpcap-devel \
|
|
|
|
hiredis-devel \
|
|
|
|
mongo-c-driver-{devel,libs} \
|
|
|
|
boost-{devel,atomic,chrono,date-time,system,program-options,regex,thread} \
|
|
|
|
libtool \
|
|
|
|
autoconf \
|
|
|
|
pkgconf \
|
|
|
|
kernel-devel \
|
|
|
|
ncurses-{c++-libs,devel,libs,static} \
|
2021-07-16 14:11:59 +02:00
|
|
|
numactl-{devel,libs} \
|
2022-01-07 18:28:47 +01:00
|
|
|
&& dnf copr disable eddsalkield/iwyu \
|
|
|
|
&& rm -vf /etc/dnf/protected.d/dnf.conf \
|
|
|
|
&& microdnf remove dnf-plugins-core -y \
|
|
|
|
&& rpm --nodeps -e dnf \
|
2022-03-24 17:56:35 +01:00
|
|
|
&& microdnf clean all -y && \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
printf "/usr/local/lib\n" >> /etc/ld.so.conf.d/local.conf && \
|
|
|
|
/usr/sbin/ldconfig && \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
bash -c 'export MAKEFLAGS="$MAKEFLAGS -j$(nproc)" && printf "$MAKEFLAGS\n"; \
|
2021-05-05 21:51:42 +02:00
|
|
|
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:$PATH"; \
|
|
|
|
git clone https://github.com/ntop/nDPI.git /tmp/nDPI && \
|
|
|
|
cd /tmp/nDPI ; \
|
2021-05-07 04:15:05 +02:00
|
|
|
git checkout 1.7; \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure && \
|
|
|
|
make && \
|
|
|
|
make install && \
|
|
|
|
make clean && \
|
|
|
|
git switch - ; \
|
2021-05-05 21:51:42 +02:00
|
|
|
./autogen.sh && \
|
|
|
|
./configure && \
|
|
|
|
make && \
|
2022-03-24 17:56:35 +01:00
|
|
|
make install'; \
|
|
|
|
\
|
|
|
|
if [ -f /tmp/nDPI/config.log ]; then cat /tmp/nDPI/config.log; fi; \
|
2021-05-05 21:51:42 +02:00
|
|
|
rm -rf /tmp/nDPI
|
|
|
|
|
2022-03-24 17:56:35 +01:00
|
|
|
# nDPI is by default (left unchanged) installed with prefix "/usr/local".
|
|
|
|
# we make sure the results (libs in /usr/local/lib) get picked up in subsequent
|
|
|
|
# linkings against it by aappending to /etc/ld.so.conf.d/local.conf.
|
|
|
|
# see https://git.dotya.ml/wanderer/docker-fedora-cpp/issues/1
|
|
|
|
#
|
|
|
|
# further, building nDPI would fail with plain RUN inside kaniko.
|
|
|
|
# having it wrapped in 'bash -c' helped
|