FlexDeploy can be configured to automatically build a Docker image as a part of the building process.
This configuration is to be done for each stream providing a groovy script for Docker Image name and specifying if the image should be automatically built and pushed at the end of the build request. If it is not specified to build the image automatically, the image can still be built by a workflow step invoking the dockerBuildProjectImage operation of the FlexDeployDockerPlugin. Either way, the build workflow execution will store a reference to the built Docker Image which is available on the Artifacts tab of the workflow execution screen.
The build instance must be a Docker host to use this feature, and the dockerBuildProjectImage operation of the FlexDeployDockerPlugin must be associated to the build instance. See Creating and Editing Instances for more information on how to add a plugin operation to an Instance.
Optionally, a path to Dockerfile can be provided. If it is empty, a default Dockerfile in a project source checkout folder is expected. If the checkout folder is empty, then a Dockerfile is expected in the root of the FD_TEMP_DIR. A Dockerfile must be present to build an image. This behavior changed slightly in 5.0.3 beta. Previously, the location was expected to be in FD_TEMP_DIR/FD_PROJECT_NAME.