Docker commit cannot save changes.

  docker, question

Use dockerfile to build a mirror, ssh login to modify tomcat file configuration, close the container and use docker commit to save the changes, restart the container and find that the modified file has not been saved. Why?

Open another terminal to commit.