Similar to private containers for your main boxes wercker also allows for private service containers.
By default, Wercker fetches private containers from the Docker Hub. Below is an example service definition for a wercker.yml file that retrieves a private container from the user
dijkstra containing the repository rethinkdb. The credentials for Docker Hub are passed along as environment variables (
$PASSWORD) that could either be exported in a Wercker step, or defined in the Wercker web interface.
services: - id: dijkstra/rethinkdb username: $USERNAME password: $PASSWORD tag: latest
If you’d rather use a private registry, the following service definition showcases how to fetch a container from quay.io. The username in this case is
lamport and the repository is
rabbitmq. Again the
$USERNAME/$PASSWORD combo is passed along through environment variables that you either have exported or defined in the Wercker web interface.
services: - id: quay.io/lamport/rabbitmq username: $USERNAME password: $PASSWORD tag: latest registry: quay.io
Note that the domain name for the private registry (in this case
quay.io) is defined before the
username/repo combination when using a custom registry.