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

Fix PATH to use the fully generic binstubs #208

Merged
merged 2 commits into from
May 16, 2018

Conversation

yosifkit
Copy link
Member

bundler binstubs are not necessarily generic; they were until bundler 1.16 and should be fixed back, but will likely be non-generic again by default in 2.0

See rubygems/bundler#6469 (comment) for more context.

Fixes #188. Fixes #191. Closes #193.

I have successfully built the following Dockerfiles using this change that fail in the current ruby images:

FROM ruby:2.4-test
RUN set -ex;\
    git clone https://github.com/jwt/ruby-jwt.git;\
    cd ruby-jwt;\
    bundle install
RUN set -ex;\
    git clone https://github.com/janlelis/clipboard.git;\
    cd clipboard;\
    bundle install;\
    ls -la /clipboard/Gemfile.lock


FROM ruby:2.4-test
RUN set -ex;\
    git clone https://github.com/jwt/ruby-jwt.git;\
    cd ruby-jwt;\
    bundle install;\
    cd ..;\
    hash -r; \
    git clone https://github.com/janlelis/clipboard.git;\
    cd clipboard;\
    bundle install;\
    ls -la /clipboard/Gemfile.lock

bundler binstubs are not necessarily generic; they were until bundler 1.16 and should be fixed back, but will likely be non-generic again by default in 2.0

See rubygems/bundler#6469 (comment)
@tianon
Copy link
Member

tianon commented May 16, 2018

Can we include a link in the Dockerfile itself to rubygems/bundler#6469 (comment)? 😇

@tianon
Copy link
Member

tianon commented May 16, 2018

It was green before the comment addition, merging. 👍

@tianon tianon merged commit 7e99145 into docker-library:master May 16, 2018
@tianon tianon deleted the path-fix branch May 16, 2018 19:49
@tianon
Copy link
Member

tianon commented May 21, 2018

This change removes $GEM_HOME/bin from PATH, so gem install xyz no longer puts binaries in PATH -- perhaps we need to couple this with no longer setting BUNDLE_BIN, and add $GEM_HOME/bin to PATH explicitly too.

@tianon
Copy link
Member

tianon commented May 21, 2018

#209 👍

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

Successfully merging this pull request may close these issues.

Gemfile.lock not created for second project in Dockerfile
2 participants