CloudBees action: Copy a remote image with Crane

1 minute read

Use this action to copy a remote image from a source to a destination with crane, a tool for managing container images.

Prerequisites

Before invoking the action, you must have a Docker config file in the ${HOME}/.docker/config.json path. This file is used to authenticate with the Docker registry.

Use either of the below actions to generate a Docker config file.

If your source and destination registries are different, you must authenticate to both registries. Invoke the Docker registry authentication action separately for those registries before invoking the crane action.
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 1. Input details
Input name Data type Required? Description

src

String

Yes

The source image to copy.

destination

String

Yes

The destination image.

platform

String

No

Specifies the platform in the format os/arch[/variant][:osversion]

skip-image-validation

String

No

Default is true. When true, the source and destination image validation is skipped.

Usage example

In your YAML file, add:

- name: Copy a remote image with Crane uses: cloudbees-io/crane@v1 with: src: <source registry>/<image name>:<source image tag> destination: <destination registry>/<image name>:<destination image tag> platform: linux/amd64 skip-image-validation: 'false'