Linode allows you to install multiple applications on the same server. But at times, there can be a requirement to isolate certain apps due to security reasons.
That’s where Docker helps.
Docker is a tool that allows to create and deploy packages needed to run an application on independent containers. Often, doing wrong steps while installing Docker may end up in errors.
At Bobcares, we help Linode owners to properly setup Docker as part of our Managed Cloud Services.
Today, we’ll see how our Cloud Engineers install Docker on Linode and fix common setup errors.
Why Docker ?
Firstly, let’s take a look on how Docker helps Linode server owners.
Suppose, you have developed an app and wish to replicate it to many servers. Docker comes handy here. It helps you to run the same app in different Docker containers inside the Linode server. Thus, it helps in easy deployment, saving time and effort.
Also, Docker helps you to isolate container from each other. As a result, you can implement separate security mechanisms in each container.
Similarly, it can reduce inventory costs as the Docker containers run on the existing Linode server.
Again, Developers can make use of Docker to test the applications and features.
Luckily, many popular projects like Linux-Apache-MySQL-PHP (LAMP) maintain predefined templates that can be used on the go. And, that’s another reason to go ahead with Docker in Linode.
How to setup Docker in Linode?
We’ve seen the various benefits of Docker. Let’s take a look on how our Support Engineers setup Docker in Linode servers.
Before installing Docker, our Linode Experts ensure that server runs on a 64-bit architecture, has all packages updated and has live internet connection.
Then, we get the packages from the docker website. For example, in a CentOS 7 server we complete the Docker installation by executing these commands.
curl -fsSL https://get.docker.com/ | sh
systemctl enable docker
systemctl start docker
After installation, to confirm the status of Docker, we use
systemctl status docker
And a successful docker installation would show the following results.
[root@lixx-xx1 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since xxx;
Common errors with Docker setup in Linode
Although installing docker in Linode is rather simple, we often see Linode customers complain about errors in Docker. Let’s have a look at the top errors that we see.
1. Docker not starting up
Recently, a customer reported that Docker setup was not going through. The error said:
Aug 24 11:57:32 localhost systemd[1]: Failed to start Docker Application Container Engine.
Aug 24 11:57:32 localhost systemd[1]: docker.service: Unit entered failed state.
Aug 24 11:57:32 localhost systemd[1]: docker.service: Failed with result 'exit-code'.
Here, our Dedicated Engineers started troubleshooting by checking the kernel version on the Linode server. Docker relies on a few kernel modules like OverlayFS. Unfortunately, the customer had an old Linode kernel that doesn’t include this module support. So, to make Docker running, we had to install the latest Kernel on the server and then redo the Docker set up.
2. Unsupported operating system
Yet another reason for Docker set up errors is unsupported server types. Docker team currently imposes the 64 bit restriction to keep their code cleaner. As a result, any attempt to setup Docker on 32-bit Linode server will simply fail.
That’s why, our Dedicated Engineers always check and ensure the basic requirements prior to the installation of Docker in Linode
[Trouble installing docker in Linode? Our Linode Experts can fix it for you.]
Conclusion
Installing Docker in Linode helps to create any number of containers with all the packages for your app. Today, we saw how our Support Engineers effectively setup Docker in Linode servers and fix common installation errors.
I am attempting to use the following command in my linode.
sudo docker-compose up -d
I am receiving an error saying
“ERROR /docker-compose.ymal is not supported. You might be seeing this because you’re using the wrong compose.
I ran the command to check that it is running, and it says that it is running.
If you can help that would be great.
Thank you
Hi,
Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).