-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathDockerfile
36 lines (25 loc) · 941 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
FROM python:3.10
LABEL org.opencontainers.image.source https://github.com/binarly-io/fwhunt-scan
ARG rz_version=v0.6.2
# add library paths
ENV LD_LIBRARY_PATH=/tmp/rizin-$rz_version/build/librz/core
RUN apt-get update
RUN apt-get install -y ninja-build parallel
RUN pip install meson==1.0.0
# add fwhunt_scan unprivileged user
RUN useradd -u 1001 -m fwhunt_scan
# install rizin from source code
WORKDIR /tmp
RUN wget https://github.com/rizinorg/rizin/releases/download/$rz_version/rizin-src-$rz_version.tar.xz
RUN tar -xvf rizin-src-$rz_version.tar.xz
WORKDIR /tmp/rizin-$rz_version
RUN meson build
RUN ninja -C build install
# install fwhunt_scan
COPY fwhunt_scan_analyzer.py /home/fwhunt_scan/app/
COPY requirements.txt /home/fwhunt_scan/app/
COPY fwhunt_scan /home/fwhunt_scan/app/fwhunt_scan
WORKDIR /home/fwhunt_scan/app/
RUN pip install -r requirements.txt
USER fwhunt_scan
ENTRYPOINT ["python3", "fwhunt_scan_analyzer.py"]