Pages

Monday, 10 February 2020

Top 18 Docker commands for Automation Tester/Devops/SDET/Test Lead?


Check post for MAVEN commands and Interview Question:
MAVEN Commands

Docker Commands:Interview Question



Docker is an open-source platform that allows developers to create, deploy, and run applications in containers. Containers are lightweight, standalone, and executable packages that contain everything needed to run an application, including code, libraries, and system tools.

There are several reasons why Docker is useful for software testing:

  1. Consistent Environments: Docker provides a way to create and run applications in a consistent environment, which means that you can test your application in the same environment as the one it will be deployed in.

  2. Isolation: Docker containers are isolated from each other and from the host system, which means that you can test your application without worrying about interfering with other applications or the host system.

  3. Reproducibility: Docker allows you to create reproducible environments, which means that you can easily recreate a specific environment to reproduce a bug or to test a new feature.

  4. Scalability: Docker makes it easy to scale your testing infrastructure up or down, depending on your needs. You can easily spin up new containers to test different parts of your application, or to test your application on different platforms.

  5. Cost savings: Docker allows you to test your application on a smaller infrastructure footprint than traditional virtualization, which can save costs on hardware, maintenance, and energy.

Overall, Docker makes it easy to test your application in a controlled, consistent, and reproducible environment, which can help you find and fix bugs faster and ensure that your application works as intended in production.



1. docker --version -> To check Docker Version.

2. docker pull <Image-Name> -> To download Docker Image from Docker Hub.Pull an image or a repository from a registry

3. docker ps -> To check how many Containers are Up and Running.

4. docker ps –a -> To check how many Containers are Available, Up and Running.
 
************************************************ 
 
 
************************************************ 

5. docker run -it -d <Image-Name> -> To Create Docker Container from Docker Image.

6. docker start <Container-Id> -> To Start Container.

7. docker restart <Container-Id> -> To Restart Container.

8. docker stop <Container-Id> -> To Stop Container when in Running.

9. docker rm <Container-Id> -> To Delete Docker Container.

10. What are the commands for Dockerfile?

Ans: Dockerfile is a very important section, check the link HERE for all commands related to Dockerfile.


************************************************ 

GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT
************************************************


10. docker rmi <Image-Id> -> To Delete Docker Image.

11. docker images -> To check for Available Docker Images in System.

12. docker exec –it <Container Id> bash -> To Get into Container and take Control on it.

13. exit -> To Come Out from Container to Docker.

14. docker kill <Container Id> -> To Stop Container Forcefully.
 
************************************************
************************************************ 

15. docker inspect <Container Id> -> It will give complete information about Container.

16. docker image prune –a -> It will delete images which doesn’t have even a Single Container.

17. docker run --rm <Image-Name> -> Create a docker container and auto remove on exit

18. How to setup docker with selenium grid for cross browser testing?



19. docker system prune -a  : it will delete all the images, containers and networks which are not used to be active anymore.

*******************************************************************
For any doubts or career guidance, reach out to me 


********************************************************************





Do remember that knowing Linux is one of the most important aspect to work as an SDET.

****************************************

TOP 15 BDD - CUCUMBER Interview Q&A


************************************************

✍️AUTHORLinkedIn Profile

************************************************

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python

5 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Hot Desking

    ReplyDelete
  4. Informative content. Thanks for sharing

    ReplyDelete
  5. Very good post. Please continue to post such awesome posts. It was so nice reading the article and it helped me improve my knowledge as an updated one. Thanks a lot.

    DevOps Certification Training in Electronic City

    ReplyDelete