forked from bytehow/docker-ghidra-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.beta
50 lines (33 loc) · 1.43 KB
/
Dockerfile.beta
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
FROM gradle:jdk11 as builder
ENV GITHUB_URL https://github.com/NationalSecurityAgency/ghidra.git
RUN apt-get update && apt-get install -y curl git bison flex build-essential unzip
RUN echo "[+] Cloning Ghidra..." \
&& git clone ${GITHUB_URL} /root/git/ghidra
WORKDIR /root/git/ghidra
RUN echo "[+] Downloading dependencies..." \
&& gradle --init-script gradle/support/fetchDependencies.gradle init
RUN echo "[+] Building Ghidra..." \
&& gradle buildNatives_linux64 \
&& gradle sleighCompile \
&& gradle buildGhidra
WORKDIR /ghidra
RUN echo "[+] Unzip Ghidra..." \
&& unzip /root/git/ghidra/build/dist/ghidra_*_linux64.zip -d /tmp \
&& mv /tmp/ghidra_*/* /ghidra \
&& chmod +x /ghidra/ghidraRun \
&& rm -rf /ghidra/docs /ghidra/Extensions/Eclipse /ghidra/licenses
##########################################################################################
FROM openjdk:11-jdk-slim
LABEL maintainer "https://github.com/blacktop"
COPY --from=builder /ghidra /ghidra
RUN apt-get update && apt-get install -y fontconfig libxrender1 libxtst6 libxi6 dnsutils --no-install-recommends \
&& echo "===> Clean up unnecessary files..." \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives /tmp/* /var/tmp/*
WORKDIR /ghidra
COPY entrypoint.sh /entrypoint.sh
COPY server.conf /ghidra/server/server.conf
RUN mkdir /repos
EXPOSE 13100 13101 13102
ENTRYPOINT ["/entrypoint.sh"]
CMD [ "server" ]