Build and Push an Image to Docker Registry Step Settings
This topic provides settings for the Build and Push an Image to Docker Registry step.
This step creates a Docker image from a Dockerfile and pushes it to a Docker registry.
The step is the equivalent to the docker build command.
In this topic:
- Docker Connector
- Docker Repository
- Build Arguments
- Remote Cache Repository
- Run as User
- Set container resources
- See Also
The unique name for this step.
Harness Connector to docker to use for uploading the image.
The name of the Repository. For example,
Docker build tag (
Each tag should added separately.
Enables this option to redo snapshot mode.
The name of the Dockerfile. If you do not provide a name, Harness assumes the Dockerfile is in the root folder of the codebase.
Context represents a directory containing a Dockerfile which kaniko will use to build your image.
COPY command in your Dockerfile should refer to a file in the build context.
Docker object labels to add metadata to the Docker image.
The Docker build-time variables (
The Docker target build stage (
Remote Cache Repository
Enter the Cache repo name.
Run as User
Set the value to specify the user id for all processes in the pod, running in containers. See Set the security context for a pod.
Set container resources
Maximum resources limit values for the resources used by the container at runtime.
Maximum memory that the container can use.
You can express memory as an integer value with one of these suffixes: G, M, Gi, Mi.
Limit the number of cores that the container can use.
Limits for CPU resources are measured in cpu units.
Fractional requests are allowed. The expression 0.1 is equivalent to the expression 100m, that can be read as one hundred millicpu.
Timeout for the step. Once the timeout is reached, the step fails, and the Pipeline execution continues.