Just debugged a tricky build failure in which the
reusable key of
setup_docker_remote prevented a newer version of an image from being pulled.
We’ve a base image called
alpine-ruby:2.4 that previously used Ruby
2.4.3, but was recently updated to use Ruby
Our CircleCI build, however, continued to use the
2.4.3 Ruby version of
alpine-ruby:2.4 despite a newer version using Ruby
2.4.4 being available. This led to a head-scratching
Your Ruby version is 2.4.3, but your Gemfile specified 2.4.4
B/c running the image locally showed Ruby
Seems that caching is based on tags instead of hashes? Or maybe this is only for the base image? .
In any case, this seems like a pretty severe drawback of Docker layer caching. Or maybe we’re not using it correctly?