binaryanalysis-ng
binaryanalysis-ng copied to clipboard
Docker issues
I tried to get binaryanalysis-ng working in docker. Here are the problems i encountered:
- The docker instructions in the README doesn't work
- In
Dockerfile.kaitaithe filenamekaitai-struct-compiler-0.10-SNAPSHOT.zipis hardcoded but have since changed (same as issue #121 )
Step 7/12 : RUN unzip -d / jvm/target/universal/kaitai-struct-compiler-0.9-SNAPSHOT.zip
---> Running in b74c7540079c
unzip: cannot find or open jvm/target/universal/kaitai-struct-compiler-0.9-SNAPSHOT.zip, jvm/target/universal/kaitai-struct-compiler-0.9-SNAPSHOT.zip.zip or jvm/target/universal/kaitai-struct-compiler-0.9-SNAPSHOT.zip.ZIP.
The command '/bin/sh -c unzip -d / jvm/target/universal/kaitai-struct-compiler-0.9-SNAPSHOT.zip' returned a non-zero code: 9
make: *** [Makefile:12: docker-kaitai] Error 9
-
src/Makefileassumes thatkaitai-struct-compileris in PATH but it is not
Step 5/16 : RUN make
---> Running in b21cb46187e5
kaitai-struct-compiler -t python --outdir `dirname "parsers/font/pcf/pcf_font.ksy"` parsers/font/pcf/pcf_font.ksy
/bin/sh: 1: kaitai-struct-compiler: not found
Makefile:25: recipe for target 'parsers/font/pcf/pcf_font.py' failed
make: *** [parsers/font/pcf/pcf_font.py] Error 127
The command '/bin/sh -c make' returned a non-zero code: 2
-
src/Dockerfileassumes thatbangshellis in the PATH which it is notpython3: can't open file '/kaitai_struct/runtime/python/bangshell': [Errno 2] No such file or directory
I'm going to create a pull request that fixes these issues.
Besides that I think the following things could be changed:
- It's a little confusing that the makefile target is called "docker-kaitai" but the default value for "CTR_BUILDER" is not docker. Maybe podman and docker should just have different makefile targets instead of being dependent on the "CTR_BUILDER" variable.
- It's not clear how to invoke bang-scanner from the docker image.
Thanks for the report. Currently we are refactoring the code a lot, so it might take some time before we get to this.