3.7 Additional commands
docker inspect: Get details from containers (both running and stopped). Things such as IPs, volumes, etc.
docker logs: Get console messages from running containers. Useful when using with web services.
docker commit: Turn a container into an image. It make senses to use when modifying container interactively. However this is bad for reproducibility if no steps are saved.
Good for long-term reproducibility and for critical production environments:
docker save: Save an image into an image tar archive.
docker load: Load an image tar archive to become an image.
docker export: Save a container filesystem into a tar archive.
docker import: Import a filesystem tar archive into an image (you need to specify a target tag).
- Save a previously created image into a tar archive (Look at the command’s options for help). Remove the original image and recover it again.