To better undersatnd:
to download tomcat: docker pull tomcat:latest
to run tomcat: docker run -d --name mytomcat -p 8080:8080 tomcat:latest
to change to the container that you create in this example "mytomcat" is the NAME of your tomcat: docker exec -it mytomcat /bin/bash
to move files between folders for backup: mv webapps webapps2
at last to copy the files that are missing in "webapps" folder from "webapps.dist": mv webapps.dist/ webapps
exit
I hope it helps.