Docker Concepts…
What is Docker?
- Docker is a tool designed to make it easier to deploy and run applications by using Containers.
- Container allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies and ship it all out as one package.
Why do we need Docker?
Imagine you are working on an analysis in R and you send your code to a friend. Your friend runs exactly this code on exactly the same data set but gets a slightly different result. This can have various reasons such as a different operating system, a different version of an R package, et cetera. Docker is trying to solve problems like that.
A Docker container can be seen as a computer inside your computer. The cool thing about this virtual computer is that you can send it to your friends; And when they start this computer and run your code they will get exactly the same results as you did.
Advantages of Docker
- Build App Only Once
- Portability
- Version Control
- Isolation and Secure
Let’s see some Concepts of Docker…
1. Docker Images
A Docker image is a read-only template, images are used to create Docker containers
2. Docker Hub
- A Docker registries hold images, these are public or private stores which you upload or download images
- The public Docker registry is provided with the Docker Hub
3. Docker file
- Docker can build images automatically by reading the instructions from a Docker file.
- A Docker file is a text document that contains all the commands a user could call on the command line to assemble an image.
4. Docker Compose File
- Docker Compose makes it easier to configure and run applications made up of multiple containers.
Now let’s see what is selenium grid…
The Selenium Grid is a testing tool which allows us to run our tests on different machines against different browsers.
What is a Hub?
In Selenium Grid, the hub is a computer which is the central point where we can load our tests into.
What is a Node?
In Selenium Grid, a node is referred to a Test Machine which opts to connect with the Hub.
Now let’s see basic Docker Command Line Interface’s
- docker build
- docker images
- docker run
- docker ps
- docker stop
- docker rm or docker rm -f
- docker rmi
You can refer this Github repo for context
https://github.com/DeepaliKalagate/BroadleafCommerceDockerDemo/settings
Congratulations!!! You can run your Selenium Tests on Docker with the help of this story…