Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

332
Visualizações
docker - how can we export/import (or save/load) only the new changes?

I'm new to docker, Could any one help for below query

  1. Server has a docker image like 1GB Image:ver1 [this image stored has .tar file in server]
  2. In ubuntu PC donwloaded the tar image form server and loads/import the image[Image:ver1] using Docker
  3. A new Image:ver2 is available on the Serever, size is still 1GB but difference with ver1 is only 10MB.

Q1: If it’s possible to “import/load” the new image[Image:ver2] from server, how can we export/import (or save/load) only the new changes[i.e 10MB]?

Q2: if we are able to apply above changes on top o existing image[i.e Image:Ver1], what are the steps to do?

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Docker is a file based system and for each Pull request, it only pulls out the files which are changed. For example, if suppose you have 1 GB data in a file in a docker image. Now, you added 500MB of data to it. Then, in case of docker pull, it will only pull the changes, i.e the Delta part between the 2 files. So, you are safe and it won't pull all the things separately.

Although, while making a DockerFile, or docker conf file, you should be very careful, as all the lines in a Docker file is stored as a layer in the system. If suppose you have 10 layers in your Docker file, and you are changing the 5th layer, then all the layers after the 5th layer will again be pulled. That is the only catch using Docker. Rest, it will always pull the Delta of changes for each pull request.

about 4 years ago · Santiago Trujillo Relatório

0

If you want to save/load tar files of docker images, there's no option to export a partial image. You can send over the full image, move your data to be an external volume that isn't transfered this way, or you can use a docker registry.

The latter is relatively easy to implement, docker includes an image where you can run your own private registry. Pushes and pulls to a docker registry will only send the changed layers, so you can make use of layer caching and structure your Dockerfiles to minimize the number of changed layers.

about 4 years ago · Santiago Trujillo Relatório

0

Ok, I've built the tool to create diff (in top layers) of docker images' versions (layer by layer) as a tarball and inflate the original image later.

Note. Works only for changes in top layers.

4-step process:

  1. docker inspect -> make json with old layers' hashes as a json file
  2. Prepare diff based on new image and hashes of old (existing) layers
  3. Transfer diff to target machine
  4. Inflate target image's tar based on diff and old image
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda