Binderhub always tries to build ignoring any prebuilds

Using my private gitlab repository binderhub will always clone and build an image even if one already exists in the docker registry. It’ll even finish the build and then after pushing say the image is already built. Is this known fixable behaviour?

Thanks

This can occur when the docker registry config isn’t quite correct, so it’s checks for whether an image exists always return False. I recently hit this myself when I was updating ovh.mybinder.org. We had the config:

binderhub:
   registry:
     url: https://3i2li627.gra7.container-registry.ovh.net/binder

when what we needed was:

binderhub:
   registry:
     url: https://3i2li627.gra7.container-registry.ovh.net

(no /binder on the registry url in that case). The result was that the images it looked for had an extra binder/ on the front, which weren’t the ones being pushed.

Check the logs of BinderHub, possibly with debug logging enabled:

config:
  BinderHub:
    log_level: 10

You might see something useful that hints at why it’s not finding the images.

1 Like

So it turns out it’s a bug in docker registry that have too many sub directories. This means that gitlab docker registry currently doesn’t work very well. I’ve submitted a fix for review and someone did a year ago too.

1 Like