Pushing the project to Docker Hub

To enable this functionality, we will activate the final portion of the container.yml file by removing the curly braces after the registries section. Under the registries section, we will create a subsection called docker, that takes two major parameters: URL and namespace. For this example, since we are using the Docker Hub registry, we will provide the public API URL for Docker Hub (at the time of writing) and the username we created at the beginning of the chapter as the namespace parameter. The registries section of your container.yml should resemble the following:

registries:
  docker:
    url: https://index.docker.io/v1/
    namespace: username

It should also be noted that you can name your registry anything ...

Get Containerization with Ansible 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.