blacktop/docker-ghidra

Exception on start

Closed this issue · 4 comments

I'm trying something a bit different. I'm trying to run this image on Ubuntu 18.04 but I'm getting an Exception from Java on startup:

$ docker image ls
REPOSITORY        TAG       IMAGE ID       CREATED        SIZE
blacktop/ghidra   latest    3df06bde5093   26 hours ago   1.46GB
$ docker run --init -it --rm \
  --name ghidra \
  --cpus 2 \
  --memory 4g \
  -e MAXMEM=4G \
  -e DISPLAY=host.docker.internal:0 \
  -v /tmp/samples:/samples \
  -v /tmp/root:/root blacktop/ghidra
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode)
INFO  Using log config file: jar:file:/ghidra/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)  
INFO  Using log file: /root/.ghidra/.ghidra_10.3.2_PUBLIC/application.log (LoggingInitialization)  

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "Ghidra"

I've completely opened X11

xhost +

Any hints you can give to figure out what might be going on?

Thank you!

I figured it out!

An example on how to run ghidra on Ubuntu (18.04):

docker run --init -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix \
  -e DISPLAY=$DISPLAY \
  -h $HOSTNAME \
  -v $HOME/.Xauthority:/home/lyonn/.Xauthority \
  -v /tmp/samples:/samples \
  -v /tmp/root:/root blacktop/ghidra \
  --cpus 2 --memory 4g -e MAXMEM=4G \
  --name ghidra

Looks like it's running fine. Closing.

Do you mean the host running docker is Ubuntu 18?

Do you mean the host running docker is Ubuntu 18?

Yes.

I should add that there is no need to run socat on Ubuntu if you run with the above.