Nutshell
Pull Image
docker pull debianCreate container from image
docker run debian # The container will get a random name.
docker run debian --name "my-debian" # recommendedStart a container and mount Apache document root to a local folder in your workstation:
docker run --name "my-debian" -it --mount type=bind,source=/work/my-projects,target=/var/www/html debianStart/Stop container
docker start my-debian
docker stop my-debianConnect container
docker exec -it my-debian /bin/bashList running containers
docker psList all containers
List images
Delete container
Delete image
Save container as an image
Load an image from backup
Push image
Build an image
You can create custom images using docker build. For example, you can start from a base image (eg Debian) and the install custom software according to your needs (php, Apache, MySQL or whatever).
Transfer files
From local file system to running container:
From running container to local file system:
Docker info
Docker inspect
Use docker inspect to get information for a specific docker object (eg image, container, network, etc)
Last updated