docker capture state of container code example
Example 1: docker container logs
docker container logs --details container-id
Example 2: commit container to image
sudo docker commit [CONTAINER_ID] [new_image_name]
docker container logs --details container-id
sudo docker commit [CONTAINER_ID] [new_image_name]