diff --git a/Dockerfile b/Dockerfile index 0643df5..0ff91fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,5 +33,7 @@ ENV BUNDLE_PATH="$GEM_HOME" \ # path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438 ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:/usr/lib/fullstaq-ruby/versions/${RUBY_VERSION}/bin:$PATH +# Make login shell (bash -l) to have the same path as regular one. +RUN echo 'PATH=$GEM_HOME/bin:$BUNDLE_PATH/gems/bin:/usr/lib/fullstaq-ruby/versions/${RUBY_VERSION}/bin:$PATH' >> /etc/profile.d/fullstaq-ruby.sh CMD [ "irb" ] diff --git a/README.md b/README.md index a92aaf5..067c5d2 100644 --- a/README.md +++ b/README.md @@ -87,16 +87,6 @@ For Ruby 3.0 and older, short aliases for latest patch versions are made against Ruby is installed from official APT package repository. Rbenv isn't used. -## Caveats - -Bash login shell `bash -l -c 'command'` resets `$PATH` to default. It is not clear why it happens there, because in official Ruby image it works and this image is based on the same `debian:stretch-slim` base image. - -That may hurt you if you're using `whenever` gem which wraps every command in Bash login shell by default. To remove this wrapping place following to the top of your `config/schedule.rb`: - -```ruby -# config/schedule.rb -set :job_template, nil -``` [Fullstaq Ruby]: https://fullstaqruby.org/ "Ruby, optimized for production" [Hongli Lai]: https://www.joyfulbikeshedding.com/