ContainerBuild@0 - Container Build v0 task

Container Build Task.

Syntax

# Container Build v0
# Container Build Task.
- task: ContainerBuild@0
  inputs:
    #dockerRegistryServiceConnection: # string. Docker registry service connection. 
    #repository: # string. Container repository. 
    Dockerfile: 'Dockerfile' # string. Required. Dockerfile. Default: Dockerfile.
    #buildContext: '.' # string. Build context. Default: ..
    #tags: '$(Build.BuildId)' # string. Tags. Default: $(Build.BuildId).

Inputs

dockerRegistryServiceConnection - Docker registry service connection
string.

Specifies a Docker registry service connection.


repository - Container repository
string.

The name of the repository within the container registry.


Dockerfile - Dockerfile
string. Required. Default value: Dockerfile.

The path to the Dockerfile.


buildContext - Build context
string. Default value: ..

The path to the build context.


tags - Tags
string. Default value: $(Build.BuildId).

The list of tags in separate lines. Tags are used while building and pushing the image to container registry.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities Running this task satisfies the following demands for any subsequent tasks in the same job: Buildctl
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Build