a modified clone of https://github.com/polvi/docker-reg