You can refer to
Check docker image list
$ docker image ls
Check docker container list
$ docker container ls
Start a container from an image
$ docker run -ti <image> bash --login
Example, run.sh
$ docker run -v `pwd`/data:/home/student/data --user student --hostname biodocker -ti biodocker bash --login
- Note: It automatically login the container at the same time.
- Note: to logout, ctrl-D or exit. ctrl-D does not stop the container, but exit stops the container
Start a container
$ docker container start <container_ID>|<container_name>
Stop a container
$ docker container stop <container_ID>|<container_name>
Remove a container
$ docker container rm <container_ID>|<container_name>
Commit a container to a image
$ docker commit <container_ID>|<container_name> <image_name>:<tag>
Login a container
$ docker exec -it <container_ID>|<container_name> bash
Save an image to file
$ docker save <image_name> -o <file.tar>
Example
$ docker save biodocker -o my_biodocker.tar