You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

The Docker Build Action is a premium action which allows you to construct a docker image from a Docker File and a Docker Context. The Docker File describes how the docker image should be constructed, while the Docker Context gives access to any required files to make the created image work. Subsequently running the docker image will create a container, which is an instance of the image.  

Name

A friendly name for this action (will be displayed in the actions workflow area).

Enabled

Determines if this action will be run within the relevant stage.

Working Directory

The directory on the agent to run the docker command in. If any relative directory is used in the Dockerfile Path, this will be the directory that it is based on. It's typically not a good idea to rely on this directory for the Dockerfile path. All relevant files should be held within the Docker Context. 

Docker Context

The Docker Context is a directory that contains extra files required to build the Docker Image, including the Dockerfile. If a file is missing from the Docker Context that the build requires an error will be generated and the build will fail. 

Image Name

A name to give to the resulting image. This is usually in the format of {repository}:{tag} where the repository can take the format of {user_name}/{image_name}. Docker command line parameter: --tag.

Dockerfile Path

Specifies the path of the Dockerfile to use. The Dockerfile describes exactly how the image should be constructed. This should generally be contained within the Docker Context directory.  Docker command line parameter: --file.

Target Build Stage

The name of an intermediate build stage to use as a final stage for the resulting image. Docker command line parameter: --target

Specify remote Docker host

Tick to open a new Host tab to specify an alternative Docker host to the one local to the agent. 

Using

The version of Docker to use when running the Docker Build command. It is important that the agent has the correct version of Docker installed for the Dockerfile provided.  


Specify docker host

Specify docker host option allows for the connection to a remote Docker host to perform the Docker Image Build on the agents behalf. Note that the Docker command line interface on the agent is used to talk to this host. It is for this reason that the correct version of Docker be selected when using this option. 

TLS Verification

TLS Verification allows for two methods of verifying the connection to the Host;

  • Use TLS - where the host is not verified against a CA.
  • Force Host Verification - where the Host is verified against its CA.

When using Force Host Verification if the Hosts CA is not trusted by the agent then the connection is not established. 

URL Docker Host

The address of the Docker Host. This can be in the form of a URL or any IP4 Address. If a non-standard port is required simply use the <IPAddress>:<Port> specitifcation format. 

Docker Host CA Certificate

The Docker Host CA Certificate is the PEM format certificate file of the Hosts CA. 

Docker Host Certificate

The Docker Host Certificate is the PEM format certificate file for the Host.

Docker Host Certificate Key

The Docker Host Certificate Key is the PEM format key file for the accessing the Docker Host Certificate. 

  • No labels