In the field of virtualization, Docker is a great tool which is very lightweight compared to the triditional virtual machines. It enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.
To start the journey with Docker, first, we need to install Docker on our machine. The community version of Docker is free and open-source, and it’s available for most of the operating systems like Linux, Windows, and macOS.
After installing Docker, you can start playing with it. Here are some basic example commands in daily use. More commands can be found in the official documentation.
docker login
- Log in to a Docker registrydocker info
- Display system-wide informationdocker version
- Show the Docker version informationdocker images
- List imagesdocker rmi
- Remove one or more imagesdocker pull
- Pull an image or a repository from a registrydocker push
- Push an image or a repository to a registrydocker build
- Build an image from a Dockerfiledocker ps
- List containersdocker run
- Run a command in a new containerdocker kill
- Kill one or more running containersdocker exec
- Run a command in a running containerdocker commit
- Create a new image from a container’s changesdocker cp
- Copy files/folders between a container and the local filesystem