Docker Commands

Docker Commands

In this tutorial we will learn docker commands

docker run image-name

It will download image from docker hub if its not at local system and create container .After create container it install image in container and run program.

docker help

It will show all commands provided by docker and their syntax.

docker help Command-name

It will give details description of particular Inc.From there we can download images.

docker ps

It will give details of all running container in system.

docker logs container-name

It will display logs for associated container.

docker stop container-name

Stop the program in container.

docker exec container-name ps

List all the process with their PID in given container.

docker run -d --name container-name image-name

I will create image in container whose name will be container-name and that process will be background process.

docker rename container-old-name container-new name

It will rename container from container-old-name to container-new name.

docker create image-name

To create container in stopped state.

How can we start container if container is already created ?

docker start container-name.

How to remove container from computer ?

docker rm container-name.

How to search image in docker ?

docker search image-name.

How to install image from command line in docker ?

docker pull image-name.

How to see all images in container in docker ?

docker images

How to remove image from container in docker ?

docker rmi -f image-name

How to load image from file system in docker ?

docker load -i preparationforinterview.zip

Where preparationforinterview.zip contains image




Visit Others Links

Docker Introduction
Docker Features
Docker Installation On Window
Docker Hello World Example On Window
Software Download In Docker Using command line
Software Search From Docker Hub Web Console
Docker Image Install from File System
Docker Volume Example
Installation Of Mysql in Docker With Example
Docker Frequently Used Commands
Top Docker Interview Question
© 2019 PreparationForInterview.com