Registry
Basic Auth
Create a password file with htpasswd:
$ docker run \
    --entrypoint htpasswd \
    httpd:2 -Bbn foo password > htpasswd
Usage
Login to the registry by providing the username and password given in Basic Auth:
$ docker login foo.example.com