Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

Search





Overview

The Docker Registry Integration is used to connect the JFrog Pipelines platform to Docker Hub, Docker Trusted Registry, or a Docker registry in Artifactory so that you can pull and push Docker images.


Page Contents


Creating an Integration

You can add this integration by following steps on the Managing Pipelines Integrations page.

Here is the information you need to create this integration:

  • Name -- choose a friendly name for the integration
  • url -- an optional field that defaults to Docker Hub if left empty. To use with Docker Trusted Registry or Docker Private Registry, enter the location of your private registry. Format https://foo.com
  • User Name -- username of your Docker Registry Account
  • Password -- password of your Docker Registry Account

Usage 

The Docker Registry integration can be used in the Image resource.

The Docker Registry integration can also be added directly to a step in the integrations section. This automatically configures the Docker CLI with access to the registry.

Default Environment Variables

When you create a resource with this integration, and create a step that uses it, a set of environment variables is automatically made available.

Environment variable

Description

res_<resource-name>_registry_urlURL supplied in the integration
res_<resource-name>_registry_usernameUsername supplied in the integration
res_<resource-name>_registry_passwordPassword supplied in the integration


When you add this integration directly to a step, a set of environment variables is automatically made available.
Environment variableDescription
int_<integration-name>_urlURL supplied in the integration
int_<integration-name>_usernameUsername supplied in the integration
int_<integration-name>_passwordPassword supplied in the integration

Example

  • This example uses a Docker Registry integration named myDocker, which is used in the Image_1 resource.
  • The Pipelines DSL for this example is available in this repository in the JFrog GitHub account.
resources:  
  - name: Image_1
    type: Image	
    configuration:	   
      registry: myDocker	      
      imageName: docker/jfreq_win	      
      imageTag: latest	
      autoPull: true

pipelines:
  - name: pipelines_Image_1
    steps:
      - name: step_Image_1
        type: PowerShell
        configuration:
          nodePool: win_2019
          inputResources:
            - name: Image_1
        execution:
          onExecute:
            - write-output "executing step..."
            - if($Image_1_isTrigger -ne "true"){
              Write-Error "Stop" -ErrorAction Stop
              }
  • No labels
Copyright © 2021 JFrog Ltd.