-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
48 lines (39 loc) · 1.44 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
# loadwordteam/ghidra-server
ARG ghidra_install_path=/opt/ghidra
# We need an OpenJDK17 image NOT based on alpine (or anything with
# musl libc), this server has problems even with the ARM JVM, let's
# use a very boring flavour.
FROM debian:bullseye-slim AS builder
ARG ghidra_install_path
ARG ghidra_url=https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_10.3_build/ghidra_10.3_PUBLIC_20230510.zip
ARG ghidra_sha256=4e990af9b22be562769bb6ce5d4d609fbb45455a7a2f756167b8cdcdb75887fc
ARG ghidra_version=10.3_PUBLIC
ARG ghidra_repo_path=/srv/repositories
ENV LANG=C.UTF-8 \
GHIDRA_HOME=${ghidra_install_path} \
GHIDRA_REPO_DIR=${ghidra_repo_path}
ADD $ghidra_url ghidra.zip
RUN apt -qq update \
&& apt -y install \
locales \
gettext-base \
ncat \
openjdk-17-jre-headless \
unzip \
&& echo "${ghidra_sha256} ghidra.zip" | sha256sum -c \
&& unzip -qo ghidra.zip \
&& rm ghidra.zip \
&& mkdir -p /opt \
&& mv "ghidra_${ghidra_version}" "${ghidra_install_path}" \
&& rm "${ghidra_install_path}/server/server.conf" \
&& rm -rf /var/lib/apt/lists/* \
# Set timezone to UTC by default
&& ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime \
# Use unicode
&& locale-gen C.UTF-8 || true
WORKDIR "${ghidra_install_path}/server"
COPY ./server.conf.tmpl /
COPY entrypoint.sh /
EXPOSE 13100 13101 13102
ENTRYPOINT ["/entrypoint.sh"]
CMD ["./ghidraSvr", "console"]