moving docker images around using ssh and pipe
how to move docker images around using ssh and pipe
For moving some docker images around, or VPN .conf
files; sometimes I do this:
from local to remote
docker save alpine:lates
export or save filessh remote-host
ssh to remote-hostcat - |
read from STDIN and pipe itdocker import - alpine:latest
read from STDIN and save it
Then alpine:latest
will be available on remote-host
from remote to local
ssh remote-host
ssh to remote-hostdocker save getmeili/meilisearch
run this command<(CMD)
redirect the output back to STDIN<
read from STDINdocker import - getmeili/meilisearch
read from STDIN
Then getmeili/meilisearch
will be available on local host.
from remote to another remote (by help of a local)
In this style, I download shf.conf
file from the remote-host (1) and without write it to desk sent it to another remote-host (2).
Actually we can omit cat - <
and use:
And this also sends newline if we be prompt for password , so the third version is better:
Last updated
Was this helpful?