Closed debkantap closed 4 months ago
Thanks @debkantap we'll have a look.
Hi @debkantap !
Are you executing the docker build command from the directory where you clone the repo?
For example: your_path\soca
This is the command you have to use from the soca directory: docker build -t [INSERT_NAME] .
Thanks!
Hi @esgg yes, I have cloned the soca repo inside "C:\Deb\Working\Poc". then cd into 'soca' , where I have the Docker file and then running the blow command:
docker build -t socadebkantap:latest .
After that I am getting one image, but I think that is not error free, as image tag is none, the build is exiting with code 127 ..
PFA
TR Deb ![Uploading images.jpg…]()
From what I'm seeing, the problem only happens when the image is built in Windows.
The script installer.sh is inside of the container but it can't be executed.
I have replaced the line RUN ./installer.sh for RUN sh installer.sh in the Dockerfile, but appears another error. It seems is related to the if command.
I will continuw working to find a solution for Windows.
HI @debkantap !
I have removed the IF block initializing the databaseToken variable. It doesc't make sense to have this block.
I have checked in a Windows and it works.
Could you check again?
Remember: 1º/ Download the new version of the files (Dockerfile + installer.sh). You can use the git pull command 2º/ Generate the image. Remember to include the option --no-cache to avoid the use of the cache.
Many Thanks @esgg. Now I am able to build the image. and run the image as docker run -it --network soca_socaNet socadebkantap:latest /bin/bash Let me procced with other steps to generate the portal. I shall update you
TR Deb
Hello @esgg .
Now I am able to run soca on docker desktop and generate the all artifacts for my github repository. But when I click on the 'index.html' it is not fetching the right data. pls see attached. Pls note that I mapped my local windows directory to the container folder. I am opening from my local windows machine only. I guess this is because of 'path' issue. I have similar issue logged, it that resolves this will also resolve I think. https://github.com/oeg-upm/soca/issues/118 Pls advice.
Also I did setup the influxdb and grafana..there also the dashboard is not coming properly. PFA Pls help.
In addition in the documentation I found few issues:
TR Deb
Thank you for the new issues @debkantap . They are some typos, indeed.
I do not see any attached file. Could you send it again?
I am going to check the related issue #118 .
sorry ....my bad ..I missed the attachment. Here it is
Also the attachment from grafana dashboard ...which is showing nothing!! Bith pointing to same repo.
TR Deb
We are going to focus in the first screenshoot.
Could you run the container again with the previous command "docker run -it --network soca_socaNet socadebkantap:latest /bin/bash"? Then, verify: 1º/ The csv files have been generated (oeg-upm_repos and oeg-upm_metadata). See if they have some content. 2º/ There is an oeg-upm_portal directory and the existance of the card_data.json. This file should contain a json object of each repository analized.
An alternative: After running the docker with the previous command, execute the command "sh container_run.sh" (in the soca directory). Then verify the points 1 and 2.
If everything fails, send me the docker's logs (command docker logs
Thanks!
Hi @esgg I have logged in to container with "docker run -it --network soca_socaNet socadebkantap:latest /bin/bash", and then runthe commands as you suggested:
Now the problem is if I open "/soca/oeg-upm_portal/index.html" in browser, it is not showing the repo cards :)) PFA
What I am doing wrong here?
TR Deb
@debkantap cards are loaded through javascript. By default your browser will block javascript, unless you set up a local server. If you put the example on a github page or you serve the files in a local server you will be able to see everything correctly
Hi @dgarijo ..u mean I need a web server to run this? I though I will host in on any object storage like minio or s3 Is this a static portal? ..'static' means if I add or modify something on the Git repo/org, then again I have to generate the portal through soca to reflect it on cards portal?
TR Deb
The generated portal is static. You can serve it through GitHub pages, see: https://oeg-upm.github.io/soca/example/oeg-upm/index.html as an example. You just need to host the files in order to see the website, because loading JSON is usually disabled in your local machine by browsers. Or set up a local Apache Tomcat server in order to see the results.
You will have to re-generate the cards (cards_data.json file) in order to refresh the contents of the portal
thanks @dgarijo for the clarification. One more thing, does this code supports only github repo or it will also work with bitbucket, gitlab or azure repo as well?
TR Deb
Somef (the tool used to generate the cards) works with GitHub and Gitlab. We have not tested it out with BitBucket or azure, but I think it should work as long as a readme/repo is publicly available.
@dgarijo many thanks for the input..I will test it in azure repo and post. Can you pls also explain what is the role of soca-dash which uses influxdb and grafana
TR Deb
Soca-dash is optional. It provides a dashboard with metrics of the good practices followed by the repositories in an organization. For example, repos with license, repos with citation, repos with descriptions, most used languages, etc. It can be used to monitor the evolution of the best practice adoption in the org. The idea is to regenerate/update the portal once in a while to show the evolution.
Soca-dash has a stable release but we have some updates planned.
Thanks @dgarijo and @esgg for your support. I am closing this issue. I shall do some experiment of my own and keep you posted if I further face any issue. Many thanks once again. BR Deb
I was trying to build soca image in docker desktop. Edited the installer.sh file to include influxdb configuration. Edited the container_run.sh to configure my repository. The image is not getting build properly. Poping with below error:
Step 14/16 : RUN python -m nltk.downloader stopwords ---> Running in 8c69df305ff4 /usr/local/lib/python3.10/runpy.py:126: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) [nltk_data] Downloading package stopwords to /root/nltk_data... [nltk_data] Unzipping corpora/stopwords.zip. Removing intermediate container 8c69df305ff4 ---> 55db5528867e Step 15/16 : RUN ./installer.sh ---> Running in 60de6f47f4c0 /bin/sh: 1: ./installer.sh: not found The command '/bin/sh -c ./installer.sh' returned a non-zero code: 127
Please help.
TR Deb