Tuesday 25 August 2020

Docker tutorial for beginners

Docker tutorial for beginners

Question: What is docker?
Docker is a container management service.
It is for mainly for developers to easily develop applications, push them into containers which then be deployed anywhere to physical server/virtual server/cloud server.

Question: Features of Docker?
  1. Docker containers are lightweight so they can be easily scalable.
  2. Deploy docker containers on any physical and virtual machines and even on the cloud.
  3. Docker has the ability to reduce the size of development by providing a smaller part of the operating system via containers

Question: What is container in docker?
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
Applications are better shape in containers and Docker provides the isolation capabilities.

Question: What is docker image?
A Docker image is a file, comprised of multiple layers, that is used to execute code in a Docker container.
Images can exist without containers, whereas a container needs to run an image to exist.

Question: What is a docker hub repository?
Docker Hub is a hosted repository service provided by Docker for searching and sharing container images.
hosted repository can be public or private.
URL: hub.docker.com

Question: How to install docker in windows 10 Pro?
  1. Open the link : Download docker for windows
  2. Click on "Get Stable" Link
  3. Download the file
  4. Once downloaded, then simply install

Question: How to check the version of docker?
docker --version

Question: How to list the running docker containers ?
docker container ls

Question: How to list the all docker containers ?
docker container ls -a

Question: How to list the all docker images?
docker images

Question: How to pull the docker container from docker hub?
docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql