sudo docker run -i -t ubuntu /bin/bash sudo docker commit [container id] [tag]
Is that what you are looking for?