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

Files are not parsed on dockers codecompass/* #749

Open
sebastopol06 opened this issue Jun 6, 2024 · 3 comments
Open

Files are not parsed on dockers codecompass/* #749

sebastopol06 opened this issue Jun 6, 2024 · 3 comments

Comments

@sebastopol06
Copy link

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.

@mcserep
Copy link
Collaborator

mcserep commented Jun 18, 2024

Hi @sebastopol06,

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

@sebastopol06
Copy link
Author

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?

@mcserep
Copy link
Collaborator

mcserep commented Jun 30, 2024

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>

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

No branches or pull requests

2 participants