forked from kjcolley7/docker-ghidra-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (27 loc) · 1.51 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
FROM openjdk:11-jdk
# Install necessary packages: wget, unzip, and ed (used by ghidraSvr script)
RUN apt update && apt upgrade -y && apt install -y wget unzip ed && rm -rf /var/lib/apt/lists/*
# Download Ghidra, verify checksum, extract to /ghidra, delete zip
WORKDIR /tmp
RUN wget -q https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_10.1.5_build/ghidra_10.1.5_PUBLIC_20220726.zip -O ghidra.zip && \
echo '17db4ba7d411d11b00d1638f163ab5d61ef38712cd68e462eb8c855ec5cfb5ed ghidra.zip' | sha256sum -c
RUN unzip -q ghidra.zip && mv ghidra_10.0_PUBLIC /ghidra && rm ghidra.zip
# Setup directory structure
WORKDIR /repos
WORKDIR /ghidra
# Set the repositories dir to /repos, the account name to root, and add
# the -u parameter, which means users are prompted for their usernames.
RUN sed -i \
-e 's/^ghidra\.repositories\.dir=.*$/ghidra.repositories.dir=\/repos/g' \
-e 's/^wrapper\.app\.parameter\.2=/wrapper.app.parameter.4=/g' \
-e 's/^wrapper\.app\.parameter\.1=-a0$/wrapper.app.parameter.2=-a0/g' \
server/server.conf && \
echo 'wrapper.app.account=root' >> server/server.conf && \
echo 'wrapper.app.parameter.3=-u' >> server/server.conf && \
echo 'wrapper.app.parameter.1=-ip0.0.0.0' >> server/server.conf
# -e 's/^wrapper\.console\.loglevel=INFO$/wrapper.console.loglevel=DEBUG/g' \
# -e 's/^#wrapper\.debug=.*$/wrapper.debug=true/g' \
# -e 's/^wrapper\.logfile\.loglevel=.*$/wrapper.logfile.loglevel=DEBUG/g' \
VOLUME /repos
# Actually start Ghidra server
CMD ["/ghidra/server/ghidraSvr", "console"]