Managing the server storage
One of the critical aspects of container management relates to the storage. So far we have started and executed a container which could be further enhanced by deploying applications on top of it and eventually adding specific configurations. You might be surprised, however, that when restarting the Docker image the changes you have applied are not included in your image.
This is not a defect of your container- Docker aims to preserve your containers data so that you can, at any time, restart them with minimal overhead. There are, of course, many strategies to handle changes happening to your container data. The cheapest solution could be to use the docker commit
command, which as the name suggests, can be used to commit a container's file changes or settings into a new image. You need to provide it the container ID and the image to create (or update).
For example:
$ sudo docker commit 1b2d77f52f84 packt/eap-7.0:version2
Although useful for development purposes...