Docker is an application that makes it simple and easy to run application processes in a container
Using Docker we can host / run different website / application in same VPS. So we can run different wordpress /joomla /any other platforms in a single VPS using MySQL databases and apache server.
We all know WordPress installations will share an Apache installation and share a MySQL database. That means that if one crashes, it could bring down the other. And if the database gets corrupted, both your sites could be affected.
When we use Docker if one application or website crashed never effect another one .Improve VPS security and stability run perfectively
Here we can check how to install Docker
#1. Installing Docker
First, run this series of commands using terminal, to set up the Docker repository.
sudo apt-get install apt-transport-https ca-certificates curl curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update
Once installed, you can install the latest version of Docker CE.
sudo apt-get install docker-ce
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" sudo apt-get update
Finally, you can install Docker CE.
sudo apt-get install docker-ce
You’ll need to edit /etc/apt/sources.list to comment out the following line:
Save and exit the file, and then you can install Docker CE.
Start by enabling the Docker CE repository.
Then, you can install and enable Docker.
#2. Testing Docker
#3.Enable Automatic Start Docker
$ sudo systemctl enable docker
Docker could be a fantastic tool to assist in your preparation automation and positive has it’s place in testing. however in apply it’s a security nightmare for your live production systems. the matter is that the extra quality created once attempting to securedocker mistreatment the on top of tips outweighs its advantages. It’s foolish to suppose that you just get actual separation mistreatment containers on high of a shared kernel.
create a Docker network that we will use to bridge all of these containers together
then Installing nginx-proxy with Docker
Installing nginx-proxy with docker-compose, create a docker-compose.yml add following commands
To run just run following command
Also important to note is the –net nginx-proxy line in the Docker command, and the networks: default: external: name: nginx-proxy block in the docker-compose.yml file. These establish that all containers will communicate over that Docker network.
Add a container to the proxy, we can use wordpress as a example
then copy following code to docker-compose.yml
double check DNS setup is okey, then it will work smoothly
We believe that this article has helped you with the information on Alts solution are always happy to help you. Alts solution is one of the top most Digital marketing and App Development company. We offer high-quality service in Web Design and development, SEO, Web Hosting, App Development and Social Media Marketing,Online Reputation Management. We are one of the top Online Reputation Management in India.. If you have any doubt regarding this topic, please make sure to comment, the professional techies at