DevOps Assignment Day 2 – P. Sai Harshini
q1. What is a Docker ?
a1. A docker is a tool for managing container. A container is fully independent app run time environment. Managing involves :
create, start , stop, restart, pause and un-pause. Using docker we can manage containers .
Docker is a software platform which enables creating, running, distributing applications. It enables developers to package the applications that is containerization of various components. It provides consistent and isolated environments.
q2. What is a container ?
a2. Container is a fully independent isolated app run time environment It is a isolated package that contains system tools, libraries, etc. to run software applications. They do not need operating Systems. Perhaps it requires a Docker image.
We can run executable files inside the containers. The containers are very light weight that means it consumes less disk space unlike Virtual Machines. Multiple containers can be run at a time.
q3. Top 5 Advantages of Docker
a3. The advantages of Docker are :
- Provides isolated environments for running applications
- It is fast and flexible. It takes seconds of work to create a container.
- Fast Development
q4. 10 Commands used in today’s LAB.
a4. They are :
- docker create httpd : creation of a container
- docker ps -a : To view the list of containers already available
- docker start container_id : start a specific container after creating it.
- docket stop container_id : stop a specific container.
- docker rm conatiner_id: remove a specific container. Can’t remove a container which is running currently. we need to stop it first.
- docker exec -it container_id bash : enter inside a container.
- docker inspect container_id : inspect specific container. It provided data like ip address etc.
- docker run -itd docker_image: create a container of docker image ex. ubuntu
- docker pull ubuntu : installs ubuntu
- docker iamges : lists out the docker images available with us on system.