Everything you need to know

Introduction to Docker

A Linux-based containerization platform that allows developers to package their applications into containers.

Top Docker Commands

This command renders the version information in an easy-to-read format by default. For Server Version - docker version –format ‘{{.Server.Version}}’   To dump raw JSON data - docker version –format ‘{{json .}}’

1. docker –version

Search Docker hub for public images. Returned information contains image name, description, stars, automated, etc.   Syntax:  docker search <imageName>

2. docker search

Retrieve images or remote repositories from the registry. Command to pull Debian image from docker hub-   Syntax:  docker pull debian

3. docker pull

Creates a container from an image or runs a command in a new container.   Syntax:  docker run -it -d ubuntu

4. docker run

Accesses the running container and executes the command inside it.   Syntax:  docker exec -it bash

5. docker exec

Creates one or more running containers.   Syntax:  docker stop <container id>

6. docker stop

Retrieve/fetch logs present when executing a docker command.    Syntax:  docker logs <container name>

7. docker logs

Find out more about Docker commands along with their syntax.

Click Here