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

Group parameters by using Windows #3

Open
AnatoleAnacrouse opened this issue Sep 20, 2018 · 3 comments
Open

Group parameters by using Windows #3

AnatoleAnacrouse opened this issue Sep 20, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@AnatoleAnacrouse
Copy link

AnatoleAnacrouse commented Sep 20, 2018

I am using Docker and docker-cat image on Windows 10.

Docker run command requiers an --env parameter in order to map groups. But, in my Windows configuration, there is no groups (except generic WORKGROUP).

Trying command such as : " docker run -v //C/Users/Anatole/sources:/media/sf_Shared -p 9000:9000 -p 9001:9001 -e ALLOWED_GROUPS="ANATOLE\Anatole" lequal/docker-cat " (computer-name\account-name) leads to a warning => "groupmod: invalid group ID 'CHENES\Chenes'".

Container creation continues (see attached log) but at the end SonarQube is not launched.

Please could you provide us with a aprameter guide on Windows ?

Thanx

@AnatoleAnacrouse AnatoleAnacrouse changed the title Group parameter by using Windows Group parameters by using Windows Sep 23, 2018
@WaldoFR WaldoFR added enhancement New feature or request question Further information is requested and removed enhancement New feature or request labels Sep 24, 2018
@WaldoFR
Copy link

WaldoFR commented Sep 24, 2018

Hi,

I've been working on this image using Linux only.

Could you please run the container with Windows 10 sharing your project file with the following command :
docker run -v <host_project_folder>:/media/sf_Shared:rw -p 9000:9000 -p 9001:9001 lequal/docker-cat

Then, once the container is up, execute the following command as a docker user :
docker exec -it <container name> /bin/bash

When you are able to execute command inside the terminal, enter the following commands :

cd /media/sf_Shared
ls -la

What is the identifier set for the file's group ? If it's a digit, you might use it as ALLOWED_GROUPS on container launch, otherwise get the /etc/group identifier to get it.

Regards.
Omar

@AnatoleAnacrouse
Copy link
Author

AnatoleAnacrouse commented Sep 24, 2018

Hi Waldo,

do please first notice that the complete comment using the -env parameter such as ALLOWED_GROUPS="1000;1001;1002" is useful in my Windows 10.

I have tried launching your commands, container also is useful. The result of the ls command is the folowwing :
# ls -al
total 4
drwxr-xr-x 2 root root 40 Sep 24 08:01 .
drwxr-xr-x 3 root root 4096 Sep 24 15:39 ..

Opening this folder with Kitematic, an popup windows ask me if I want to allow access to the folder, and the following information message appeard fat the beginning
[INFO] Docker-cat could not find any specified permission for Sonarqube. Use allow-group command to set new ones.
[INFO] Docker-cat permissions for sonarqube finished.
[INFO] docker-cat, initiating connection with Sonarqube.

Then the analysis can be launched after loging admin/admin (otherwise, a message warms me that I do not have rights).

In both cases, the containers uses h2 database and not Postgres. A second env is created /opt/sonarqube/data. I have retreived in this folder all the h2 database resulting of the analyses.

Best regards

@WaldoFR
Copy link

WaldoFR commented Sep 25, 2018

Do you use -env or --env ?

The turnaround in your case would be to set the root GID which is 0 in ALLOWED_GROUPS, however it's a bad practice which is volontary forbidden by the script init.sh in the function allow_group.

You might edit the line if [ ${#GID[@]} -gt 0 ] to if [ ${#GID[@]} -ge 0], build a new image and run the container with the option --env ALLOWED_GROUP="0".

I'll try to find a better solution than this turnaround for Windows.

Regards

@WaldoFR WaldoFR added bug Something isn't working and removed question Further information is requested labels Sep 28, 2018
@WaldoFR WaldoFR self-assigned this Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants