Basic Questions/Answers for Docker.
Question 1: What is Docker?
Answer: Docker is an open-source containerization platform. It used to automate deployment of any application, using lightweight portal container.
Question 2: What is Container?
Answer: Container is deployed bundle of an application that contain all necessary dependencies and configuration files.
All the elements shared with based OS kernel.
Question 3: What is dangling docker image?
Answer: Dangling images are untagged Docker images that are not associated with any container. They are created when they are overwritten with a new image with the same name and tag.
Question 4: What is Container lifecycle?
Answer: Container Following is the most common.
- Create container.
- Run container.
- Pause Container.
- Stop Container.
- Start Container.
- Restart Container.
- Kill Container.
- Destroy container.
Question 5: Mostly used Docker Commands.
Answer: Following are the commonly used command.
- To run a container.
docker run -it -d -p <hostport:container-port> <image-name>
Example: docker run -it -d -p 8080:80 nginx - To list all running containers.
docker ps
- To list all container including exit one.
docker ps -a
- To stop container.
docker stop <container-name or container-id>
example: docker stop nginx - To remove container.
docker rm <container-name>
example: docker rm nginx - To build a Docker image.
docker build -t <image-name:tag>
example: docker build -t nginx:v1 - To list Docker images
docker image ls or docker images
- To remove Docker images
docker rmi <image-name/or image-id>
docker rmi nginx:v1 - To remove unused docker images
docker image prune -a
At APTRON Solutions, we believe in learning by doing. Our Linux Course in Noida provides ample opportunities for hands-on practice in a simulated environment. You'll work on real-world projects and assignments, allowing you to apply theoretical concepts to practical scenarios. Our experienced trainers offer personalized guidance and support, ensuring that you make the most out of your learning journey.
ReplyDeleteThanks for posting such an useful and informative post.
ReplyDeleteLinux course in Pune
We understand that everyone has different learning preferences and schedules. That's why we offer both classroom-based and online Linux Training Institute in Noida programs. You can choose the mode of learning that suits you best, without compromising on the quality of education.
ReplyDelete