MySQL Operator for Kubernetes Manual  /  Private Registries  /  Copy Image to Private Registry using Skopeo

6.4 Copy Image to Private Registry using Skopeo

Similar to Section 6.3, “Copy Image to Private Registry using Docker”, but you might use Skopeo. Skopeo is a container utility that can also run as a container. The following example copies the operator image from the Oracle Container Registry (OCR) to a private registry. It needs to run on a host that has Docker or Podman, and also that has access to both OCR and your private registry. Change the variable names to fit your environment, and change docker to podman if using Podman. The OPERATOR_VERSION is the MySQL Operator for Kubernetes version, such as 8.3.0-2.1.2.

export REGISTRY="..." # for example
export REPOSITORY="..." # for example mysql
export OPERATOR_VERSION=$(grep appVersion helm/mysql-operator/Chart.yaml | cut -d '"' -f2)
docker run --rm copy docker://$OPERATOR_VERSION docker://$REGISTRY/$REPOSITORY/mysql-operator:$OPERATOR_VERSION

For authenticated private registries, append --dest-creds user:pass to the skopeo command. Also append --dest-tls-verify=false if it does not use TLS.