Docker Assignment 1 – Vishnupriya
- What is Docker ?
Docker is container/Management Platform tool. It helps to save cost & time and improve quality as well. It will helps to run lots of application in less CPU & RAM compare to any other physical server.
2. What is Container?
In older days to run application virtual machine has been used. If we want to run 100s of application then we need 100 Virtual machine and each Virtual machine will require OS and each OS will consume RAM & boot system. In container model, one OS we can have multiple user and each user run their own number of applications. In this way consumption of RAM, memory and operating cost will be reduced. Container will have bundles of all software executables to run application.
3. Top 10 commands with 1 example of using docker container
- docker images -> To see list of images available in docker system
2. docker ps -> To see list of all running containers
10. docker rm containername -> To remove container
12. docker run -itd imagename -> Create container from an image
- docker pull imagename => To pull image from repository
4. docker tag imagename reposiotryname (docker tag vishnu tvishnup/vishnupriya) => To tag image to reposiotry
5. docker build -t imagename . (docker build -t vishnudockerimage .) => To build an image
5. five commands with 1 example of using docker registry?
- docker run -d httpd => To create container in faster way (It will create container & pull image from reposiotry)
2. docker tag imagename reposiotryname (docker tag vishnu tvishnup/vishnupriya) => To tag image to reposiotry
3. docker pull imagename => To pull image from repository
4. docker push username/repository => To push image to repository
5. docker login => To login to hub repository
6. docker logout => To logout from hub repository
7. docker commit -m”up-up-git-apache” 5fd8e4229356 vishnu=> It will create layer with combination of git , apache & java images inside container called 5fd8e4229356