To view all the commands you can use in your docker installation use the following
docker –version
you can also use the help command to get the list of available commands as:
docker help
to get information about any specific command use:
docker help <command name>
for example to get information about run command:
docker help run
Hello world
There is a prebuilt image provided by docker for the hello world
After you have installed docker you can run the hello-world image using the following
>docker run hello-world
After you execute the above command following message will be displayed on screen:
Hello from Docker!
Docker registry allows to retrieve and store docker images.You can distribute docker images using registry.You can use private registry or public registry.A widely used public registry is Docker Hub.You can pull images from docker hub or store your images in docker hub.
To pull an image from docker hub use
docker pull Image-Name
for example to pull image for mongodb
docker pull mongo
service fabric image
docker pull microsoft/service-fabric-onebox
list all the running containers
docker ps
list all the container images locally
docker images
Remove docker image
you can remove docker image from your computer using the following command:
docker rmi Image Image-ID