Specify a Service Image

Because Tugboat uses Docker under the hood, every Service in your config file must use a valid Docker image address.

Here’s what you need to know about working with Service images in Tugboat:

If you want to pull a Docker image that isn’t public, you’ll need to authenticate with the Docker Registry from your project’s Repository Settings.

For a deeper dive on Service images in Tugboat, check out:

Tugboat has abstracted away some of the technical aspects of working with Docker images, but if you’re new to Docker, and want to understand more about Docker images, check out Docker’s documentation.

How to call a Service image from Docker Hub

Tugboat’s default image registry is Docker Hub. When you use an image key in the Service definition, Tugboat pulls the corresponding image from Docker Hub.

To call a Service image from Docker Hub, specify an image key in the Service definition.

For example:

services:
  apache:
    image: tugboatqa/httpd:2.4
  mysql:
    image: tugboatqa/mysql:5.6

To dissect the key value in our Apache image key example above, we’re calling:

tugboatqa : Profile of the image provider on Docker Hub; in this case, it’s TugboatQA, the organization.
httpd : This is the specific image we’re calling; in this case, it’s Tugboat’s version of the Apache HTTP Server.
2.4 : OPTIONAL version tag; in this case, we’re calling for the specific 2.4 version of Tugboat’s Apache HTTP server image. If you browse to the supported images in our GitHub repo, you can see a list of all the version tags available for Tugboat’s Apache HTTP Server image.

For more on version tags, take a look at our Docker image version tags primer.

How to use a Docker image from another registry

If you want to use a Docker image from another registry, you’ll need to specify the alternate registry, since Tugboat pulls from Docker Hub by default.

For a full breakdown of how to pull from a different registry, check out Docker’s Docs: Pull from a different registry.

An example of this in action at Tugboat might look like:

image: registry.example.com:5000/path-to-image/httpd:2.4