image

Defines which "image" will be used to start the instance of the container. Currently available providers are docker and dockerfile. In the first case the image is downloaded from Docker Registry, and in the second case, dockerfile the build is performed locally.

Usage:

image: { docker: '[NAMESPACE/REPOSITORY:TAG]' },
image: { dockerfile: './PATH_TO_DOCKERFILE' },

Docker:

The image is downloaded from Docker Registry

// short mode
image: { docker: '[NAMESPACE/REPOSITORY:TAG]' },

// explicit
image: {
    provider: 'docker',
    repository: 'NAMESPACE/REPOSITORY',
    tag: 'TAG'
},

Dockerfile:

The build is performed locally. Note that it's possible to specify the folder that contains the Dockerfile file or the Dockerfile file itself, which in this case, does not need to have the name Dockerfile.

To learn how to build your Dockerfile, check out the docs. Note that here we have the same behaviour of the command docker build, even sending all the files in the folder where is placed the Dockerfile. In order to avoid slowness, check how to create a .dockerignore file and remove useless files from the build process.

// short mode
image: { dockerfile: 'FOLDER_WITH_DOCKERFILE' },
image: { dockerfile: 'PATH_TO_DOCKERFILE' },

// explicit
image: {
    provider: 'dockerfile',
    path: 'FOLDER_WITH_DOCKERFILE'
},
image: {
    provider: 'dockerfile',
    path: 'PATH_TO_DOCKERFILE'
},
Examples:
// We can define different tags which allows us to pick different
// versions of the repository (https://registry.hub.docker.com/u/azukiapp/azktcl/)
image: { docker: "azukiapp/azktcl:0.0.1" },
image: { docker: "azukiapp/azktcl:0.0.2" },

// All settings below point to the same image,
// that is, multiple tags can point to the same image.
// Note that for the official docker images, it is not
// necessary to inform the namespace (library, in this case).
image: { docker: "node:0" },
image: { docker: "azukiapp/node" },
image: { docker: "node:latest" },
// library/ is optional only in this case, for the standard Docker repositories
image: { docker: "library/node:latest" },