The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Docker Pipeline

dockerFingerprintFrom: Record trace of a Docker image used in FROM

Records the fact that a Docker image was built from another. Deprecated: Fingerprints produced by this step are not used anywhere, and the parsing code has major limitations. See https://github.com/jenkinsci/docker-workflow-plugin/pull/149#issuecomment-451305522 and https://groups.google.com/d/msg/jenkinsci-dev/k13SfZcBWVg/iQghmCQrEAAJ If are a user of the Docker Traceability plugin you need to call this Step manually during the build. The mentioned limitations will limit the useability of this step for this purpose.
  • dockerfile
    Workspace-relative path of a Dockerfile which will be parsed for its FROM instruction.
    • Type: String
  • image
    ID or tag of the image which was just built, like --tag of docker build.
    • Type: String
  • commandLine (optional)
    • Type: String
  • toolName (optional)
    • Type: String

dockerFingerprintRun: Record trace of a Docker image run in a container

Records the fact that a Docker image was used by this build. Deprecated: Fingerprints produced by this step are not used anywhere, and the parsing code has major limitations. See https://github.com/jenkinsci/docker-workflow-plugin/pull/149#issuecomment-451305522 and https://groups.google.com/d/msg/jenkinsci-dev/k13SfZcBWVg/iQghmCQrEAAJ If are a user of the Docker Traceability plugin you need to call this Step manually during the build. The mentioned limitations will limit the useability of this step for this purpose.
  • containerId
    • Type: String
  • toolName (optional)
    • Type: String

withDockerContainer: Run build steps inside a Docker container

Normally used implicitly by method calls on the docker global variable. Takes an image ID or symbolic name which must already have been pulled locally and starts a container based on that image. Runs all nested sh steps inside that container. The workspace is mounted read-write into the container.
  • image
    • Type: String
  • args (optional)
    Any other arguments to pass to docker run.
    • Type: String
  • toolName (optional)
    • Type: String

withDockerRegistry: Sets up Docker registry endpoint

Normally used implicitly by method calls on the docker global variable. Sets up connection details for a Docker registry.
  • registry
      Nested Object
    • url
      URL to the Docker registry you are using. May be left blank to use the public DockerHub registry (currently https://index.docker.io/v1/).
      • Type: String
    • credentialsId
      • Type: String
  • toolName (optional)
    • Type: String

withDockerServer: Sets up Docker server endpoint

Normally used implicitly by method calls on the docker global variable. Sets up connection details for a Docker server.
  • server
      Nested Object
    • uri
      URI to the Docker Host you are using. May be left blank to use the Docker default (defined by DOCKER_HOST environment variable) (typically unix:///var/run/docker.sock or tcp://127.0.0.1:2376).
      • Type: String
    • credentialsId
      • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.