Rajat – Assignments
Q. What is Docker?
Ans. Docker is a software platform that allows for building, running and managing the application based on container. Docker Can have multiple images.
Q. What is Container?
Ans. A docker container is a lightweight, standalone, executable package of software to run the application. It’s an instance of an image as it uses the server information and file system provided by image. One Image can have multiple container.
Q. Top 10 commands with 1 example of using docker container.
Ans. 1 . ls, 2. docker ps
3. docker ps -a
4.docker create –name=test image
5.docker start container-id/name
6. docker stop
7. docker kill
9.docker exec containerid
10. docker inspect containerid
docker run -d –name test image
Q. 5 commands with 1 example of using docker image
Ans. 1. docker images
2. docker image pull
3. docker image push
4. docker image save
5. docker image tag
ex. docker commit -m”imagename” id imagename
Q. 5 commands with 1 example of using docker registry
1. docker pull ubuntu 2. docker run -d -p 80:80 ubuntu 3. docker history ubuntu 4. docker image tag ubuntu 5. docker stop id