1) What is Docker?
A) Docker is a tool, which helps the developers to merge the applications in to a single container. It is used to create and manages the containers. It can be used to execute the applications in many environments. It is just like virtual machines but different from that. Using the containers in docker we can run them on same hardware.
A) Container is a package it consists of all dependencies like java, git, apache, etc… which are required to run a particular application. Due to this containers memory usage would be less . Container helps to create an environment to run an application. Using this containers we can easily virtualize the operating system and run our applications anywhere.
3) What are top 5 advantage of Docker?
- Docker containers occupies less memory space.
- Better performance compared to virtual machines.
- Accessible to different platforms.
- Efficiency would be high.
- We can reuse the multiple containers present in docker for different applications.
4)What are top 10 commands you used today and one line explanations.
- systemctl start jenkins – To start jenkins.
- systemctl status jenkins – To check the status of jenkins whether it is running state or not.
- docker version – For checking the docker version after installation of docker.
- docker images -It would list all the images.
- docker ps -a – To list all the containers.
- docker pull httd – Creates an image with httd environment.
- docker create httd -Creates a container with httd environment.
- docker start container- It starts container.
- docker exec -it containername bash- It helps to enter in to container.
- docker exec containername java- To execute java which is present in container.
- History- To check history of our work in command prompt.