Docker introduction for beginners

Docker

As docker has simplified many things for software development, hence it is very important for everyone to know how to use docker in software development.

Everything required to run application has to be setup properly like database, environment variables, required libraries etc. Just imagine how cool it would be if this can be done with single click?  Yes, that we can achieve using docker.

What is docker?

Docker allows to package the application with required files and environment, share and run the application. Docker is an opensource project for automation of most stages of the software lifecycle. We can combine everything into a package then we can share or run it directly.

Docker installation, You can follow these official pages to install Docker according to your preferred operating system.

What is Docker Image?

Docker image contains everything needed to run an application including all dependencies, configurations, scripts, libraries, etc. You can run it directly without any other setup or configuration. To run application in docker you need to have a docker image.

Docker Hub

Docker hub is a repository for images. From there you can download opensource, public, community application images. You don’t have to always create docker image, you can download available images from docker hub and use in your applications.

Docker Containers

Docker containers are the running instances of docker images. So when you run any docker image, new container is created. We can create multiple instances from same image. Containers are the lightweight and better alternatives to the virtual machine, as they use the memory as per requirement and do not need complete virtual operating system.

1. Docker ps 2. Docker run 3. Docker exec 4. Docker images 5. Docker stop 6. Docker kill 7. Docker rm 8. Docker rmi