Sohan
Sohan

Reputation: 6809

How to patch exsisting images with new images in docker?

Suppose i have images pulled named, matrix-data and running with container names as matrix. Now i have few bug fixes in my matrix-data images and i want to patch it to current running images.

  1. Stop running container
  2. Build the new images with bug fix.
  3. Pull the images from registry.
  4. Restart the container.

Will the old image be over written with new one and i can start same contanier or there is different way of patching the images?

Thanks!

Upvotes: 0

Views: 1264

Answers (1)

mgaido
mgaido

Reputation: 3055

If I understood your needs, you can make your changes on the running container, then you commit it (using the same tag the image had previous the changes) then optionally you push the new image to the registry.

The new containers you start will contain your changes as the container you have changed.

Upvotes: 2

Related Questions