Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Last active January 11, 2023 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrroot5/8f2c3f88f422223692c83de04fb229af to your computer and use it in GitHub Desktop.
Save mrroot5/8f2c3f88f422223692c83de04fb229af to your computer and use it in GitHub Desktop.
Docker image copy from one host to another

Cómo copiar una imagen Docker de un host a otro sin usar un repositorio?

Necesitas guardad la imagen Docker como un fichero .tar:

docker save -o <path for generated tar file> <image name>

Ejemplo: docker save -o myfile.tar centos:16.

Copia la imagen a un nuevo sistema usando, por ejemplo: cp, scp or rsync(preferred for big files). Ahora tienes que cargar la imagen en Docker:

docker load -i <path to image tar file>

Ejemplo: docker load -i myfile.tar.

Quizás necesites usar sudo para el save y load

Fuente

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment