CloudCredo / cloudrocker

Apache License 2.0
34 stars 6 forks source link

ruby sample does not work on diego without setting HOME=/app #4

Closed jbayer closed 9 years ago

jbayer commented 9 years ago

diego value for HOME is /home/vcap docker image HOME is /app

when running the docker image /app does not appear to be symlinked to /home/vcap, so when running the ruby sample on lattice with diego i had to do a command like this to get the /app/.profile.d/ruby.sh script to have the correct values:

 lattice-cli start ruby-example -i "docker:///jbayer/ruby-example" -- /bin/bash /app/cloudfocker-start-1c4352a23e52040ddb1857d7675fe3cc.sh /app export HOME=/app \&\& source /app/.profile.d/ruby.sh \&\& env \&\& /app/vendor/bundle/ruby/1.9.1/bin/bundle version \&\& /app/vendor/bundle/ruby/1.9.1/bin/bundle exec rackup config.ru -p 8080
jbayer commented 9 years ago

simpler command is:

 lattice-cli start ruby-example -i "docker:///jbayer/ruby-example" -- /bin/bash /app/cloudfocker-start-1c4352a23e52040ddb1857d7675fe3cc.sh /app export HOME=/app \&\& source /app/.profile.d/ruby.sh \&\& bundle exec rackup config.ru -p \$PORT

i think just doing a symlink from /app to /home/vcap would do the trick when creating the docker image, but we'd have to see.

hatofmonkeys commented 9 years ago

Hi James. I'm a mechanical turk gitbot this evening. Tracking this here https://www.pivotaltracker.com/story/show/92252898

C

hatofmonkeys commented 9 years ago

Fixed when the vcap user became a real user on our builds.