grimoirelab
grimoirelab copied to clipboard
Docker build fails with Dockerfile-installed
The build for Grimorelab fails with the provided Dockerfile. Debian stretch ships with python 3.5, but the numpy dependency requires python >= 3.7. When attempting to build with newer images, either buster or ubuntu:latest, numpy builds fail.
Hi,
I successfully built the image by running the following lines:
$ git clone https://github.com/chaoss/grimoirelab
$ cd grimoirelab
$ utils/build_grimoirelab --build --relfile releases/0.2.45 --dist docker/dist
$ docker build -f docker/Dockerfile-installed -t grimoirelab:0.2.45 .
I hope it helps you.
Best, JJ
@jjmerchante I had the same error as @hogepodge but when I try your command I get another error:
$ utils/build_grimoirelab --build --relfile releases/0.2.45 --dist docker/dis GrimoireLab release: 0.2.45 Building... Built module grimoirelab: OK Built module grimoirelab-toolkit: OK Built module perceval: OK Built module perceval-mozilla: OK Built module perceval-opnfv: OK Built module perceval-puppet: OK Traceback (most recent call last): File "utils/build_grimoirelab", line 965, in
main() File "utils/build_grimoirelab", line 876, in main building.build_all() File "utils/build_grimoirelab", line 669, in build_all built = self.build_module(name=name) File "utils/build_grimoirelab", line 588, in build_module self._runner.clone_git(repo=repo_url, dir=repo_dir, commit=desc['commit']) File "utils/build_grimoirelab", line 324, in clone_git cls.run_command(['git', '-C', dir, 'checkout', commit]) File "utils/build_grimoirelab", line 293, in run_command result = subprocess.run(args, cwd=cwd, File "/usr/lib/python3.8/subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.8/subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1637, in _execute_child self.pid = _posixsubprocess.fork_exec( TypeError: expected str, bytes or os.PathLike object, not NoneType
Hi @dai-mk,
The latest version of the script utils/build_grimoirelab
requires an undefined variable for version 0.2.45.
I recommend you to switch your repository branch to a specific release and use that version of the repository. A more complete example could be:
$ grimoire_version=0.2.49
$ git clone https://github.com/chaoss/grimoirelab
$ cd grimoirelab
$ git checkout $grimoire_version
$ utils/build_grimoirelab --build --relfile releases/$grimoire_version --dist docker/dist
$ docker build -f docker/Dockerfile-installed -t grimoirelab:$grimoire_version .
You can check which is the latest release here: https://github.com/chaoss/grimoirelab/releases and change the variable grimoire_version
for your needs.
Let me know if you have any problem,
JJ
hi @jjmerchante
that actually worked great.
Based on this I wanted to build the Docker-full image (changed the FROM to the newly built "-installed" image). But I get another strange error. Are you guys aware of it?
Step 17/24 : RUN wget -nv https://github.com/grimoirelab/kibiter/releases/download/${KB_TAG}/${KB_DIR}.tar.gz && tar xzf ${KB_DIR}.tar.gz && rm ${KB_DIR}.tar.gz && sed -e "s|^#server.host: .$|server.host: 0.0.0.0|" -i ${KB_DIR}/config/kibana.yml ---> Running in eb91ab4069d5 2020-10-19 13:48:53 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/48674945/566fdb00-da2f-11e9-9957-b768ce6a6486?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201019%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201019T134825Z&X-Amz-Expires=300&X-Amz-Signature=d729f1a6a28111fe508e19451a91819c583cc40af96e0692dd117addb43aec51&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=48674945&response-content-disposition=attachment%3B%20filename%3Dkibiter-6.1.4-4-linux-x86_64.tar.gz&response-content-type=application%2Foctet-stream [152891079/152891079] -> "kibiter-6.1.4-4-linux-x86_64.tar.gz" [1] Removing intermediate container eb91ab4069d5 ---> dafb95ecaa1f Step 18/24 : RUN ${KB_DIR}/bin/kibana 2>&1 | grep -m 1 "Optimization of . complete in .* seconds" ---> Running in 80a59b46ceea The command '/bin/sh -c ${KB_DIR}/bin/kibana 2>&1 | grep -m 1 "Optimization of .* complete in .* seconds"' returned a non-zero code: 1
It seems that Kibiter 6.1.4-4 doesn't work. The latest version is 6.1.8-3, but it seems that changing the version in the Dockerfile doesn't work either. Maybe some changes are needed in the Dockerfile to make it work...
BTW if you only want to use Grimoirelab to analyze some projects, view the results in Kibana/ElasticSearch and merge identities using Hatstall, the easiest way is using docker-compose
(https://github.com/chaoss/grimoirelab/tree/master/docker-compose). Images are already created and you only need to change some configuration files.
docker-compose is where I landed. I'm running a private instance based on the docker-compose example that's tuned to meet my org needs. It took me a while of digging through the different available docs to land on that method, but it's working well. Thanks!
It seems that Kibiter 6.1.4-4 doesn't work. The latest version is 6.1.8-3, but it seems that changing the version in the Dockerfile doesn't work either. Maybe some changes are needed in the Dockerfile to make it work...
BTW if you only want to use Grimoirelab to analyze some projects, view the results in Kibana/ElasticSearch and merge identities using Hatstall, the easiest way is using
docker-compose
(https://github.com/chaoss/grimoirelab/tree/master/docker-compose). Images are already created and you only need to change some configuration files.
Ok, so I tried the docker-compose as described in the Readme, but when I open the website on port 5601 I get "Kibana server is not ready yet" (even 10 min later) and on port 8000 with default credentials I get "Server Error 500".
I also tried the docker-compose-secured.yml, but same results.
Hi @dai-mk
Ok, so I tried the docker-compose as described in the Readme, but when I open the website on port 5601 I get "Kibana server is not ready yet" (even 10 min later) and on port 8000 with default credentials I get "Server Error 500".
Can you try restarting the mordred container, like the workaround mentioned here chaoss/grimoirelab#336 - (comment)?
Hi @dai-mk, were you able to fix the problem?
Can you try restarting the mordred container, like the workaround mentioned here chaoss/grimoirelab#336 - (comment)?
If not, please feel free to open a new issue by explaining a little about the problem.
I'm closing this ticket because it doesn't have activity. Feel free to reopen it if you find a problem.