Updating applications inside running Docker containers
You might encounter some situations where you need to directly update applications that are running inside the Docker containers.
For example, you might want to test new classes, libraries, or debug issues on a local
test, quality assurance, or authoring environment before you decide to make
the changes in your production environment. This procedure explains how to copy files from your
local Docker host into the running containers.
Note: If your environment is managed by Docker
orchestration tools (such as Marathon), ensure that you follow the recommended guidelines of
building new Docker images to deploy. Otherwise, your copied files will be lost after a restart due
to the nature or orchestration tools. For more information about building new images, see Building a custom Docker image from a deployable package.
If you still must copy files, note that sometimes replacing files requires you to restart the entire Docker container before your changes take effect. You can implement third party technical solutions to restart the JVM inside the container instead of restarting the container.