save running container as image code example
Example 1: docker save container to image
$ docker save [OPTIONS] IMAGE [IMAGE...]
Example 2: commit container to image
sudo docker commit [CONTAINER_ID] [new_image_name]
Example 3: docker commit
docker commit CONTAINER_ID CONTAINER_NAME:TAG