Some Docker commands

Create an image linux centos from docker repository : docker run -it centos

To save an image to any file path or shared NFS place see the following example.

Get the image id by doing:

sudo docker images

Say you have an image with id “matrix-data”.

Save the image with id:

sudo docker save -o /home/matrix/matrix-data.tar matrix-data

Copy the image from the path to any host. Now import to your local Docker installation using:

sudo docker load -i <path to copied image file>

Leave a Reply