CodeCompass icon indicating copy to clipboard operation
CodeCompass copied to clipboard

Files are not parsed on dockers codecompass/*

Open sebastopol06 opened this issue 1 year ago • 3 comments

Hi there,

Despite no warning nor error disclaimed during the parsing step, the files stated on docker containers are not parsed. Thus most of the features are not available. image I have tried manual installation, scripts-based installation, and released dockers. Same results.

Is it a known issue or known limitation? Am I missing something? Any help on that would be highly appreciated.

sebastopol06 avatar Jun 06 '24 08:06 sebastopol06

Hi @sebastopol06,

Thanks for your interest in CodeCompass. For a start, could you share the parsing command (CodeCompass_parser) you have executed?

mcserep avatar Jun 18 '24 00:06 mcserep

Thanks for coming back to me.

Say I start from the official docker release web-sqlite and connect to the container with the below command: $ docker run --rm -ti --env DATABASE=sqlite --env BUILD_TYPE=Release --volume ~/dev/CodeCompass:/CodeCompass --volume ~/dev/<source_code_location>/:/projects/<code_label> -p 8001:8080 codecompass:web /bin/bash

In the container: # CodeCompass_parser -d "sqlite:database=~/dev/CodeCompass/workspace/<code_label>/data.sqlite" -w ~/dev/CodeCompass/workspace -n <code_label> -i /workspace/<code_label> And returns the below CodeCompass_parser: error while loading shared libraries: libmagic.so.1: cannot open shared object file: No such file or directory which is a duplicate of issue 742. However, reinstalling the parser engine on top of the released image with the tricks mentioned in the issue does not make it.

Is there a new released image drop out planned?

sebastopol06 avatar Jun 19 '24 14:06 sebastopol06

The web-* docker images indeed contain an ODB installation bug, as documented in #742. I made a PR recently to fix that in #756.

However, the web-* docker images are used for serving the CodeCompass webserver, not for parsing. You should use the runtime-* images for parsing a project, as documented.

Moreover, in your example you aim to execute the following command:

CodeCompass_parser -d "sqlite:database=~/dev/CodeCompass/workspace/<code_label>/data.sqlite" \
  -w ~/dev/CodeCompass/workspace -n <code_label> -i /workspace/<code_label>

However, the ~/dev/ folder is on your host machine based on your example, so it won't be accessible inside the docker container. Instead, you should map it as a volume to the container, see: --volume ~/dev/<source_code_location>/:/projects/<code_label>

mcserep avatar Jun 30 '24 17:06 mcserep