The following will show you how to create a new docker image from a running container that you have modified. The image will only exist locally, meaning you can only access and use it on the computer you create it. It will not be associated with any container registry.
We will start with the ubuntu container image as our base.
docker run -a stdin -a stdout -it ubuntu /bin/bash