forked from rizinorg/cutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dev
More file actions
70 lines (58 loc) · 1.68 KB
/
Copy pathDockerfile-dev
File metadata and controls
70 lines (58 loc) · 1.68 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
FROM alpine:edge AS builder
LABEL maintainer "Philipp Schmied <ps1337@mailbox.org>"
# Prevent build fails because of interactive scripts when compiling
ENV DEBIAN_FRONTEND noninteractive
# Dependencies
RUN apk add --no-cache \
bash \
cmake \
curl \
g++ \
gcc \
git \
linux-headers \
make \
pkgconfig \
python3-dev \
qt5-qtbase \
qt5-qtsvg-dev \
qt5-qttools-dev \
unzip \
wget
# install radare2 first
COPY docker/build_radare2.sh /opt/cutter/
COPY radare2 /opt/cutter/radare2
WORKDIR /opt/cutter
RUN bash build_radare2.sh
COPY docker/build_cutter.sh /opt/cutter/
COPY scripts /opt/cutter/scripts
COPY src /opt/cutter/src
RUN bash build_cutter.sh && \
bash -c 'if [[ ! -x "/opt/cutter/build/Cutter" ]]; then exit -1; fi'
FROM alpine:edge AS runner
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Add the dependencies we need for running
RUN apk add --no-cache \
bash \
libuuid \
make \
python3 \
qt5-qtbase \
shadow \
su-exec
# Add r2 user
RUN useradd r2
# Prepare files to mount configurations later on
RUN mkdir /var/sharedFolder && \
mkdir -p /home/r2/.config/radare2 && \
touch /home/r2/.radare2rc && \
chown -R r2:r2 /var/sharedFolder && \
chown -R r2:r2 /home/r2/
COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh
# Get the compiled Cutter, r2 libs and bins from the builder
COPY --from=builder /opt/cutter /opt/cutter
COPY --from=builder /usr/lib /usr/lib
COPY --from=builder /usr/share/radare2 /usr/share/radare2
WORKDIR /opt/cutter/radare2/binr
RUN make install && \
make symstall install-symlink