forked from mt8163/android_kernel_amazon_karnak_4.9
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
36 lines (29 loc) · 1.19 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
FROM python:3.13.0-slim-bookworm AS base
ENV CPPCHECK_VERSION=2.16.0
SHELL ["/bin/bash", "-c"]
WORKDIR /tmp/cppcheck
ENTRYPOINT ["my-program", "start"]
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
git \
make \
g++ \
z3 \
libz3-dev \
libpcre3-dev \
&& git clone --single-branch -b $CPPCHECK_VERSION https://github.com/danmar/cppcheck.git . \
&& make install USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes FILESDIR=/etc/cppcheck CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" \
&& echo -e "#!/bin/sh\ncppcheck --dump .\n misra.py \`find . -name '*.dump' | tr '\n' ' '\` 2> misra-report.txt" > /usr/bin/misra && chmod +x /usr/bin/misra
FROM python:3.13.0-slim-bookworm
RUN pip install --trusted-host pypi.org pygments \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
z3 \
libz3-dev \
libpcre3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /lib/apk /etc/apk /home /var /tmp /srv /media /mnt /run /sbin /opt
COPY --from=base /usr/bin/cppcheck /usr/bin/cppcheck-htmlreport /usr/bin/misra /usr/bin/*.py /usr/bin/
COPY --from=base /etc/cppcheck /etc/cppcheck
LABEL maintainer="begarco"
WORKDIR /src