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

Compare with Current View Page History

« Previous Version 10 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.  

Docker Build

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.  


Host

Docker Host URL

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. 

Use TLS

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

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

When using Verify TLS, if the Host's CA is not trusted by the agent then the connection is not established. 

CA Certificate

Path to Docker host CA certificate file.

Certificate

Path to Docker host certificate file

Docker Host Certificate Key

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


Options

Platform

Set platform if server is multi-platform capable. [--platform].

Isolation Mode

Container's isolation technology: Process namespace isolation, or Hyper-V hypervisor partition-based isolation. [--isolation].

Log Level

The amount of information detail to display in the build log.

Timeout (in seconds)

How long to wait for the action to finish running before timing out. Leaving this blank (or zero) will default to 86400 seconds (24 hours).

Treat failure as warning

Tick to continue build on failure marking the action with a warning status.


Variables

Build Time Variables

Variables that can be accessed like regular environment variables in the RUN instruction of the Dockerfile. Specify one name & value pair per line. [--build-arg].

Host IP Mappings

Host IP address mappings to add to the containers host file. [--add-host].

Labels

Metadata to add to your docker image. Specify one name & value pair per line. [--label].

Extra Command Line Arguments

Optional - Extra command line arguments to pass to Docker Build.


Environment

Multiple environment variables can be defined - one per line.

Log environment variables

If this is ticked, environment variable values are written to the build log. 

Generate system environment variables

Tick this checkbox to set up a list of new environment variables prefixed with 'ContinuaCI.' for all current system expression objects and variables.




  • No labels