Docker CLI

Build Docker images from source, apply dynamic tags, and push to JFrog, Nexus, ECR, or ACR — directly within an Opsera pipeline step, no shell scripting required.

Build | Push | Dynamic tagging | Multi-registry

circle-info

Hummingbird AI is available for this pipeline. Contact [email protected]arrow-up-right to enable AI summaries and remediation suggestions.

Prerequisites

circle-check

Pipeline setup

Create the pipeline step

1

Create the pipeline step

Log in → Pipeline → open or create a pipeline → click +.

In Step Setup: enter a name, set Tool to Docker CLI. Save.

2

Configure SCM source

Choose SCM Type (GitHub / GitLab / Bitbucket / AzureDevOps), then select Account, Repository, Branch, and optionally a Git File Path

3

Enable Docker Build

Toggle Enable Docker Build on. Enter Docker Name and optional Input File Name. Use Enable Dependency to inject build-time dependencies with parameter mapping.

4

Configure dynamic tagging Toggle Dynamic Tag on. Choose tag type: Branch Name, Build Number, or Commit SHA. For SHA, set Trim Direction (First N / Last N) and Character Limit. Toggle Add Multiple Docker Tags to associate additional tags — select Custom Tag for a free-form label.

5

Enable Docker Push Toggle Enable Docker Push. Choose Registry Type (JFrog / Nexus / ECR / ACR), then select Tool Name, Repository Configuration Type, and Repository.

6

Run and Monitor

Click Start Pipeline. View logs via Summary → Pipeline Logs → Console Output.

Field
Description

Docker Name

Name of the Docker image to build

Dynamic Tag Type

Auto-generates tag from Branch Name, Build Number, or Commit SHA

Commit SHA Trim Direction

First N or Last N characters of the SHA to use as tag

Registry Type

Target push registry: JFrog, Nexus, ECR, or ACR

Build Arguments Mapping

Map pipeline parameters to Docker --build-arg key-value pairs

circle-info

Points to remember

  • Always store registry credentials and tokens as global parameters — this ensures they are masked in pipeline execution logs.

  • TheDynamic TagandAdd Multiple Docker Tagstoggles can be used together — dynamic tag handles the primary tag while multiple tags adds static aliases likelatest.

  • When using Commit SHA as a tag, limiting to 7–8 characters is the standard Git convention for short SHAs.

  • EnableEnable Dependencyif your build process requires specific runtime tools injected before Docker build execution.

FAQs

chevron-rightCan I push multiple registries in one step? hashtag

Not within a single push toggle — but you can add multiple Docker CLI steps in the same pipeline, each configured for a different registry.

chevron-rightCan I use custom docker file path? hashtag

Yes. Use the Input File Name field to specify a custom Dockerfile path relative to the repository root.

chevron-rightWhat if the docker build fails mid pipeline?hashtag

The pipeline halts immediately at the failed step. All subsequent steps are skipped. Check Console Output under Pipeline Logs for detailed error traces.

Last updated