Table of contents

Best Practices for transferring docker images from Watson Studio Local to a remote node

There are 3 general strategies outlined in this document:

  1. Set up and maintain an external Docker Registry that is visible from both the remote node and Watson Studio Local.
  2. Use docker save and pipe it to ssh docker load on the remote node.
  3. Use Image Management to download the image and transfer it to the remote node.

There are certainly other strategies that may be used. However you move the images to the remote node, the end result must be a docker image, in the docker repository on the remote node, with the same name and tag that is on the Watson Studio Local cluster.

External docker registry

Prerequisites:

  • You have login access to both the Watson Studio Local master node and the remote node.
  • You have already set up a docker registry that is visible to both the remote node and Watson Studio Local. The instructions to set up this registry are beyond the scope of this document.

In the commands on both the Watson Studio Local master node and the remote node

  • <image> is the name and tag of the image to transfer.
  • <regImage> is a rename of the docker image with the external docker registry host name.

Log on to the Watson Studio Local master node and run the following:

docker pull <image>
docker tag <image> <regImage>
docker push <regImage>

Log on to the remote node and run the following:

docker pull <regImage>
docker tag <regImage> <image>

The remote docker registry may require login credentials.

The file utils/pushAndPull.sh is a sample script that implements these instructions.

Docker save and docker load

Prerequisites:

  • You have login access to the Watson Studio Local master node.
  • You have ssh access to the remote node.

In the commands on both the Watson Studio Local master node and the remote node:

  • <image> is the name and tag of the image to transfer.
  • <remote> is the userid and name on the remote host. It will be in the format user@host.domain.com.

Logon to the Watson Studio Local master node and run the following:

docker pull <image>
docker save <image> | ssh <remote> docker load

The file utils/loadFromDsx.sh is a sample script that implements these instructions.

Download an image with Watson Studio Local image management

Prerequisites:

  • You have login access to the remote node.
  • You have administrator role on the Watson Studio Local cluster

Steps:

  1. Log on to the Watson Studio Local cluster.
  2. In the Admin Console, go to Image management.
  3. Click Download next to the image you want to download.
  4. Choose a location for the image file.
  5. Transfer the image to the remote cluster.
  6. Log on to the remote cluster and run the following command:
    docker load < <imageFile>
    
    where <imageFile> is the path and file of the image file you transferred to the remote cluster.