Docker copy images between hosts

Copying docker images (import/export) between hosts

Sometimes it's useful to export a local docker image to another host without going through a repository

docker save -o [path for generated tar file] [image name]

For example :

docker save -o mycool-container.tar ufasoli/mycool-container:1.0

You will then need to copy the saved .tar image to the target host by however mean suits you (FTP, USB, SCP)

Once the image copied to the target host import the image to the local docker

docker load -i [path to image tar file]

Like so :

docker load -i mycool-container.tar

Depending on the size of the image this can be a long operation, but once it's finished you should be able to see your image with the usual docker images command

OSX show used ports or listening applications with their PID

On OSX you can display applications listening on a given port using the lsof the commands described below will show listening application...