dockerBuildImage
This operation builds an image from a docker file. It will not create or start a container.
Target Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Docker Unix Socket |
| No | The socket the Docker daemon listens on. Required if Docker Server and Docker Port are not set. |
Docker Server Address |
| No | The IP address of the Docker server.  Required if Docker Unix Socker is not set. |
Docker Port |
| No | The port the Docker service is listening on. Required if Docker Unix Socker is not set. |
Registry Account |
| No | The Docker Registry account to use. Please refer to the link to set up the Docker Registry Account: Docker Registry Setup For Cloud Providers |
Project Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Docker Image Name |
| No | The name of the docker image, including the repository if desired. i.e. foo/bar or bar. The plugin input |
Docker Image Tag |
| No | The tag of the docker image. For example: 1.2.3. The plugin input |
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
Docker File |
| No | The path to the Docker File to build. If empty Dockerfile is used as the name, and it is searched as specified in the next line. If an absolute path is given, it is used. Otherwise, the file is checked for relative to the FD_TEMP_DIR and any checkout folders. |
Docker File Arguments |
| No | The docker file arguments to use. These are the ARG instructions in the docker file. KeyValue pairs should be separated by "|" and the key and value should be separated by ",". Example: key1,value|key2,value|key3,value Escape commas in values with backslashes. \, |
Image Name |
| No | The Docker image use when running the container. This input will take priority over the FDDKR_IMAGE_NAME project property. |
Image Tag |
| No | The tag to use when creating the container. This input will take priority over the FDDKR_IMAGE_TAG project property. |
Docker File Arguments |
| No | The docker file arguments to use. These are the ARG instructions in the docker file. KeyValue pairs should be separated by "|" and the key and value should be separated by ",". Example: key1,value|key2,value|key3,value |
Docker Registry Account |
| No | The Registry you want to push the image to. There are a couple different spots to specify this for convenience. In order of precedence:
Please refer to the link to set up the Docker Registry Account: Docker Registry Setup For Cloud Providers |
Docker File Arguments |
| No | The docker file arguments to use. These are the ARG instructions in the docker file. KeyValue pairs should be separated by "|" and the key and value should be separated by ",". Example: key1,value|key2,value|key3,value |
Push Image to repository |
| No | Push Image to repository. |
Outputs
Output Name | Description |
---|---|
| The image id that was created from the operation. The IMAGE_ID column when running the command 'docker images'. This output will always be made available to the deploy workflow. |
| The built docker image name. The IMAGE_NAME column when running the command ‘docker images'. This output will always be made available to the deploy workflow. |
| The tag of the built image. This output will always be made available to the deploy workflow. |
| The built docker image. This output will always be made available to the deploy workflow. |
| The link to the built docker image when pushed to a repository. This output will always be made available to the deploy workflow. |
Artifacts
This operation consumes a Dockerfile from the artifacts repository. Can also be overridden through the docker file input.
Endpoint Selection
This operation delegates the selection to the workflow developer to determine.
Endpoint Execution
This operations delegates the execution to the workflow developer to decide.
Special Considerations
Build Args were not consumed
If using the 'Docker File Arguments' input and the docker file doesn't contain a matching ARG instruction, the operation will fail with the following error:
'com.github.dockerjava.api.exception.DockerClientException: Could not build image: One or more build-args were not consumed, failing build.'
To correct this, either remove the key/value mapping from the input or add an ARG instruction for the missing key in your docker file.
Docker Repository Required?
The 'Docker Repository' input is not required to build the image but in order to make use of other docker functionality, like pushing to a registry, you need to specify a repository. If you forgot to specify a repository on build you can tag the image from the command line at any point.
docker tag %ImageId% %RepoName%:%tagName%
- style