-1

My aim is to build a docker image for my application, the core part of the application is installed through RPM during the image build.

Suppose I've built my docker image with 'application-version-1.rpm' file and a container is running with this image. After one or two month back developers released a new rpm with patch 'application-version-2.rpm', I need to install/upgrade this rpm file inside the running container. as this container is running on production, how can I update my image with existing data and with the newly released rpm file. Any Idea on this.

Note: I need to stop an application service to install/upgrade the new rpm file. The Entrypoint in my docker image is the application service. So if I stop the application service, it will stop the container.

SANITH
  • 99
  • A container is not a virtual server. The idea is that you deploy a new container, with the newer release, whenever a new release needs to be deployed and you don't upgrade running containers.... – HBruijn Aug 19 '19 at 09:23

1 Answers1

1

what your are trying to achieve is definitely not in the docker philosophy.

As @HBruijn explained, you have to build a new image embedding the new rpm version, and then destroy running containers, and re-instantiate new containers with the new image.

Chaoxiang N
  • 1,283
  • 5
  • 11