-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Dockerfile
62 lines (53 loc) · 1.46 KB
/
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
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
FROM alpine:latest AS builder
LABEL maintainer "Philipp Schmied <[email protected]>"
# Prevent build fails because of interactive scripts when compiling
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies required for building Cutter
RUN apk add --no-cache \
bash \
build-base \
cmake \
curl \
git \
libuuid \
linux-headers \
make \
meson \
pkgconfig \
python3 \
python3-dev \
qt5-qtbase \
qt5-qtsvg-dev \
qt5-qttools-dev \
shadow \
su-exec \
unzip \
wget
# Clone and build
RUN git clone --recurse-submodules https://github.com/rizinorg/cutter.git /opt/cutter && \
mkdir -p /opt/cutter/build && \
cd /opt/cutter/build && \
cmake .. && \
cmake --build . -j $(grep -c ^processor /proc/cpuinfo)
FROM alpine:latest AS runner
# Get the compiled Cutter from the builder
COPY --from=builder /opt/cutter /opt/cutter
# Add the dependencies we need for running
RUN apk add --no-cache \
bash \
cabextract \
libuuid \
qt5-qtbase \
qt5-qtsvg-dev \
shadow \
su-exec
# Prepare user and files to mount configurations later on
RUN useradd cutter && \
mkdir /var/sharedFolder && \
mkdir -p /home/cutter/.config/rizin && \
touch /home/cutter/.rizinrc && \
chown -R cutter:cutter /var/sharedFolder && \
chown -R cutter:cutter /home/cutter/
WORKDIR /home/cutter
ADD entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]