create new docker image from running container code example
Example 1: how to build docker image
docker build <Dockerfile path> -t image-name
Example 2: docker how to run existing container
docker start <container-name/ID>
docker build <Dockerfile path> -t image-name
docker start <container-name/ID>