You should learn docker right now !!
You should learn docker right now!!
What is docker?
Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.The service has both free and premium tiers. The software that hosts the containers is called Docker Engine. It was first started in 2013 and is developed by Docker, Inc.
Uses of docker?
Why use docker when virtual machines are there?
Installation of docker
Using the docker
Installation of docker image
Running the docker image
After you have successfully installed the docker image, write a command to run it
In my case I am going to run the:-
The above command is running the docker-machine that takes some arguments which are -d ( --deatch means run container in the background and give the container id ) -t ( --tty means this will allocate you a pseudo - TTY ) --name this takes the name you want to give to your machine and at last you have to select which image you want to use.
Listing the containers
To list the containers that are there, there is a command named docker ps which gives the list of containers.
As you can see in the above example the docker ps command gives the list of all the containers that are running in the
Now if you want to go into your docker container you can use the command
The above command states that execute the ( interactive & TTY ) with the machine name and connect with the bash shell of the machine.
As soon as you typed the command you will be in that container within a second, now you can imagine how fast the docker containers are.
Now whatever command you will run on the container it is completely isolated and safe and secure it has nothing to do with your host system.
Just type exit if you want to get out of the container.
Starting and Stopping the containers
Now Starting and Stopping the container
If you want to stop the existing running container you have a command
Now if you want to start the existing stopped container
Deleting or removing the docker containers
If you want to delete or remove a docker container you can also do that, suppose you don't want that docker container anymore you can easily delete that container instead of just stopping it.
Conclusion:-
- Installing Docker
- Installing docker image
- Running a docker image
- Starting & stopping the docker containers
- Removing the docker containers
- Executing the docker containers