docker save 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: how to save and load the docker images
docker save -o <path for generated tar file> <image name>
docker load -i <path to image tar file>
Example 4: docker commit
docker commit CONTAINER_ID CONTAINER_NAME:TAG