I've tried using dockerdev with the 2.5.1-slim-stretch
base docker image and it kept using v1.16 for bundler.
After a little digging, I noticed that the base image explicitly defines the BUNDLER_VERSION
as an environment variable: https://hub.docker.com/layers/ruby/library/ruby/2.5.1-slim/images/sha256-f05f349dcb24a2e4d556fc95476753348e4678503689422cd093de7067ea59c5?context=explore
ENV BUNDLER_VERSION=1.16.6
The same issue is not present in the 2.6.3-slim-buster
base image.
I am not sure how to fix this elegantly. For now, I have renamed my ARG
to not conflict with BUNDLER_VERSION
but I cannot consider this optimal.
Any other ideas on how to mitigate this for ruby 2.5.1?