From 74424a9694174bb3057227a3359cf8c13c564838 Mon Sep 17 00:00:00 2001 From: soxrok2212 Date: Thu, 19 Sep 2024 19:56:14 -0400 Subject: [PATCH] docker: allow installing Ghidra natives --- Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 620c69d..70b49f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,10 @@ FROM openjdk:jdk-slim ENV GHIDRA_RELEASE_TAG Ghidra_11.0.3_build ENV GHIDRA_VERSION ghidra_11.0.3_PUBLIC_20240410 +ENV GRADLE_VERSION gradle-8.10.1 RUN apt-get update && \ - apt-get install -y --no-install-recommends wget unzip fontconfig && \ + apt-get install -y --no-install-recommends wget unzip fontconfig make gcc g++ && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -13,4 +14,13 @@ RUN wget https://github.com/NationalSecurityAgency/ghidra/releases/download/${GH rm ${GHIDRA_VERSION}.zip && \ mv ghidra/ghidra_* /opt/ghidra +RUN wget https://services.gradle.org/distributions/${GRADLE_VERSION}-bin.zip && \ + unzip -d gradle ${GRADLE_VERSION}-bin.zip && \ + rm ${GRADLE_VERSION}-bin.zip && \ + mv gradle /opt && \ + PATH=$PATH:/opt/gradle/${GRADLE_VERSION}/bin /opt/ghidra/support/buildNatives && \ + rm -rf /opt/gradle && \ + apt-get remove -y make gcc g++ && \ + apt-get autoremove -y + ENV PATH="/opt/ghidra:/opt/ghidra/support:${PATH}"