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

Singularity: appropriate workaround? #43

Open
tmozgach opened this issue Nov 28, 2017 · 2 comments
Open

Singularity: appropriate workaround? #43

tmozgach opened this issue Nov 28, 2017 · 2 comments

Comments

@tmozgach
Copy link
Contributor

tmozgach commented Nov 28, 2017

@sjackman could you please look into my solution to that problem and tell me, could we do that?
Or may be you have a more elegant suggestion.

Given: an immutable container with linuxbrew, only nano installed by brew
What we would like to get: install permanently for example, 'vim', inside the container.
My solution:
Dockerfile (tmozgacheva/orca-a):

FROM linuxbrew/linuxbrew 
RUN brew install nano
USER root
RUN chmod -R 777 /home/linuxbrew/.linuxbrew
sudo singularity build linuxbrewt3.simg docker://tmozgacheva/orca-a 
singularity image.create --size 3000 overlay.simg 
singularity shell --overlay overlay.simg linuxbrewt3.simg

The problem: We can not run brew as linuxbrew user using sudo -u linuxbrew brew as we did it before for Hackseq! When I add the following line %orca_users ALL=(linuxbrew) NOPASSWD:ALL in sudoers, inside the container, I get the following error when I run brew:

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges? 

And we can not to do anything, singularity prevents run command as sudo.
Only one way that I see, it is to make /home/linuxbrew/.linuxbrew folder writable for everyone! (e,g, RUN chmod -R 777 /home/linuxbrew/.linuxbrew)
However, I am in doubt that it is good solution but in that way, it work!
What do you think about it?

@tmozgach
Copy link
Contributor Author

@sjackman =)

@sjackman
Copy link
Collaborator

sjackman commented Nov 28, 2017

We shouldn't need to use sudo with Singularity. I'm hoping that the directory /home/linuxbrew and all its subdirectories can be owned by your own user and primary group, with permissions 0775.

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

No branches or pull requests

2 participants