crest-cassia / oacis_docker

Dockerfile for OACIS
5 stars 3 forks source link

set USER in bash_profile #73

Closed yohm closed 5 years ago

yohm commented 5 years ago

When ENV['USER'] is not set, SSH commands are not properly executed because Net::SSH module seems to refer to ENV['USER'] instead of $(whoami) to get the user name. In the current docker container, ENV['USER'] is somehow left unset in the shell started by docker exec -it -u oacis my_oacis /bin/bash -l command. Thus, saving a Host object fails because the validation of host parameters fails, which prevents us from registering a new simulator using APIs.

To dissolve this problem, we set ENV['USER'] in .bash_profile to ensure that the environment variable is properly set.