Once you have installed further Python or other packages into your container’s environment, you may wish to take a snapshot so that you can reuse the environment in other containers and with other workspaces in the future. Maybe you want to share it with colleagues so everyone can use the same standardised environment.

With the container active, click the ‘Share’ tab and then click into the ‘Clone’ sub-tab. This allows you to take such a snapshot:

Enter an Image Name. The convention is to specify ‘repo name / image name’ in lower case, for example: mycompany/jupyterstandard.

You should make sure it contains the word ‘jupyter’. This ensures that ContainDS knows to start any derivative containers as a Jupyter server.

Click ‘CLONE’ and the status of the container should change to ‘PAUSED’ which the cloning takes place. Any errors will be displayed in the Clone tab.

Cloning will only preserve your workspace files if your container has an Integrated Workspace.

If you have a workspace linked from your local hard drive, those files will remain on your local computer’s hard drive but will not end up in the snapshot. So do not clone the container in the belief that this will backup your workspace ipynb notebooks etc. Similarly, the environment should not contain any linked packages located in your workspace (e.g. Python libraries installed through ‘pip install -e’) since they will become disconnected within the snapshot.

To share an entire container including the workspace, you might want to try exporting as a file instead.

Reusing the Cloned Image

When the container has been cloned into an image, it should be available to create a new container though the My Images sub-tab under Docker in the New Containers screen.

To push the image to the publicly-accessible Docker Hub, so your colleagues and others can find it through the search functionality, you currently need to use the docker command line (sorry!). Run ‘docker login’ and enter your Docker Hub credentials. Then ‘docker push’ to send your images to the registry.