wurmlab / oswitch

Provides access to complex Bioinformatics software (even BioLinux!) in just one command.
76 stars 9 forks source link

Can't run jobs in background in the container. #3

Closed yeban closed 9 years ago

yeban commented 9 years ago

If user's login shell is bash (or neither bash, zsh, or fish and hence bash is executed in the container), following is printed to the terminal at launch.

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

Subsequently execute:

sleep 10 &
fg
bash: fg: no job control

While zsh doesn't complain when launching, job control is disabled in zsh too. (Run sleep 10 &; fg).

This happens because of -c switch to su (_init:L13). See http://serverfault.com/a/605465.

yannickwurm commented 9 years ago

Sorry @yeban - tty stuff is still failing

Yannick@n56-169 ~/g/switch> git pull                                                                                                                                                       1 master?
buAlready up-to-date.
Yannick@n56-169 ~/g/switch> bundle install                                                                                                                                                   master?
Using switch 0.0.1 from source at .
Using bundler 1.7.10
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Yannick@n56-169 ~/g/switch> bundle exec bin/switch biolinux                                                                                                                                  master?
/Users/Yannick/.zshrc:83: no such file or directory: /usr/libexec/path_helper
Yannick@biolinux-28847 ~/g/switch> uname -a                                                                                                                                                        1
Linux biolinux-28847 3.16.4-tinycore64 #1 SMP Thu Oct 23 16:14:24 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Yannick@biolinux-28847 ~/g/switch> emacs asdf
emacs: Could not open file: /dev/tty
Yannick@biolinux-28847 ~/g/switch> ls                                                                                                                                                              1
Dockerfiles  Gemfile  Gemfile.lock  README.mkd  README.mkd~  bin  lib  switch.gemspec
Yannick@biolinux-28847 ~/g/switch> emacs switch.gemspec 
emacs: Could not open file: /dev/tty
Yannick@biolinux-28847 ~/g/switch> /usr/bin/emacs asdf                                                                                                                                             1
emacs: Could not open file: /dev/tty
yeban commented 9 years ago

That's because the image doesn't get rebuilt on your system. I'm thinking how to make it happen. Temporarily can you run docker images, look for image called 'switch/biolinux' and 'switch/baseimage', delete them by docker rmi <id> and run bundle exec bin/switch biolinux again? :|

yannickwurm commented 9 years ago

Trying (its a bit rebellious); wouldn't changing version of your docker image lead to new creation?

yannickwurm commented 9 years ago

Confirmed - erasing all images (required stopping/deleting containers first) - then recreation of new biolinux image works