通常,运行过期bundler
不会导致任何问题,因此您应该能够安全地忽略警告。
但是,如果bundler
由于某种原因必须更新 的版本,则应在默认构建过程之前使用.s2i/bin/assemble
脚本来更新 的版本。bundler
所以类似于
#!/bin/bash -e
# The assemble script builds the application artifacts from source and
# places them into appropriate directories inside the image.
echo "---> Updating bundler gem..."
gem install bundler
# Execute the default S2I script
source ${STI_SCRIPTS_PATH}/assemble
应该做的伎俩。如果您将其.s2i/bin
作为可执行assemble
脚本添加到目录中的存储库(定义不要忘记chmod +x assemble
在将其添加到存储库之前),这应该会为您解决问题。
您还可以在GitHub 存储库中查看默认的 Ruby 2.5assemble
脚本: https ://github.com/sclorg/s2i-ruby-container/blob/master/2.5/s2i/bin/assemble 。如果您好奇,只需根据需要更改 URL 中的版本。sclorg