I didn't expect the BUNDLE_DEPLOYMENT=true
to override the BUNDLE_WITHOUT=test
It doesn't. If you call bundle list
you see the correct list of gems.
docker build --build-arg BUNDLE_WITHOUT="test" --build-arg BUNDLE_DEPLOYMENT=true -t bundle-deployment-bug:env .
docker run --rm -it -e BUNDLE_DEPLOYMENT=true -e BUNDLE_WITHOUT=test bundle-deployment-bug:env
Shows that the pry
gem is missing (it's in the development group) but that the minitest
gem is present, even though it was set to be skipped by BUNDLE_WITHOUT=test