Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker issues #140

Open
seihtam opened this issue May 6, 2021 · 1 comment
Open

Docker issues #140

seihtam opened this issue May 6, 2021 · 1 comment
Assignees

Comments

@seihtam
Copy link

seihtam commented May 6, 2021

I tried to get binaryanalysis-ng working in docker. Here are the problems i encountered:

  1. The docker instructions in the README doesn't work
  2. In Dockerfile.kaitai the filename kaitai-struct-compiler-0.10-SNAPSHOT.zip is hardcoded but have since changed (same as issue Container depends on unspecified kaitai image #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
  1. src/Makefile assumes that kaitai-struct-compiler is 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
  1. src/Dockerfile assumes that bangshell is in the PATH which it is not
    python3: 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:

  1. 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.
  2. It's not clear how to invoke bang-scanner from the docker image.
@armijnhemel
Copy link
Owner

Thanks for the report. Currently we are refactoring the code a lot, so it might take some time before we get to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants