I have an image and a container from it. They both run ok at the local docker host level.
I do have some issues about changing existing directory permission inside the running container and then preserving the changes.
I would like to know the proper approach to change and preserve directory perms changes in containers.
I start the container01 from template01 with
docker run -d -p 0.0.0.0:8080:80 -it --name container01 template01 bash
then connect to it with: docker attach container01
then inside I do: chmod 777 /somedir
then I detach from the container and do: docker commit container01ID template02
but when I run a new container based on the template02, the perm changes to /somedir are not preserved.
What is the proper way to do the changes and preserve them?