Docker is a technology that allows you to run applications in isolated environments called containers.

Containers are lightweight, portable, and scalable, making them ideal for cloud-native development and deployment.

Did you know that containerization saw a massive leap in adoption in 2022, with over 31% of developers worldwide stating that they are running container technologies?

RunCloud Docker is a server that leverages the popular Docker technology to isolate most of your application dependencies such as Redis, MariaDB, NGINX, PHP, and beyond from the operating system level. 

This makes your applications more secure and easier to manage.

But beyond that, this is a big under-the-hood improvement that stands to allow us to continue leveling up on how you manage your servers with RunCloud. 

RunCloud provides a simple interface to start and stop these predefined containers. Your web applications are further protected by facl, a UNIX interface to manage access, which prevents them from accessing each other’s files and folders.

Containerized Core is now out of beta and in early access. 

This means it’s safe to use in production (while there may still be rare edge-case scenarios as it rolls out across the board). 

It’s no longer necessary to be a Linux expert anymore to be able to enjoy the flexibility and security of containerized applications.

Before we proceed, it is important to note that Docker server runs on a containerized environment without a built-in firewall. To secure your server, you need to configure the firewall provided by your cloud provider. If you use DigitalOcean, Linode, Vultr, or AWS Lightsail, RunCloud makes it easy for you to do that from the dashboard itself.

If you attempt to configure firewall on a containerized container, you will get the error message shown in the above screenshot.

How To Use Docker On RunCloud

RunCloud allows you to easily manage and deploy your web applications on any cloud provider that provides a network firewall using Docker. 

To use Docker on RunCloud, you need to create a new server and select the Docker option during the setup installation.

You cannot use Docker on existing servers that are already managed by RunCloud. This is because RunCloud needs to install some packages and configurations that are specific to Docker and may conflict with your existing setup.

Here are the steps needed to create a new server with Docker on RunCloud:

  1. Log in to your RunCloud account and click on the “Connect a Server” button.
  2. Choose your cloud provider and select the provision method. We recommend using RunCloud’s automatic provisioning feature for a painless installation.
  3. In the “Installation Type” section, select the Docker option. Currently, this method only supports Nginx servers.  
Installing docker server
  1. The next steps will differ slightly depending on your installation method. If you picked the automatic installation, you can select your server configuration and deploy it directly from within the RunCloud dashboard.

    If you selected the manual installation, you’ll need to log in to your virtual machine via SSH and run the installation script.

    Either way, it’s a straightforward process; refer to our blog post about the installation process for more information.
  2. Once your server is ready, you can access it from the RunCloud dashboard and start using Docker.

How Docker Enhances Security

Docker provides better security for your application by isolating it from the host operating system and other applications on the same server. Docker containers have their own file system, network stack, and process space, which limits the access and impact of a potential attacker.

Docker also supports various security features that can restrict the capabilities and resources of a container.

For example, if you run a WordPress site in a Docker container and it gets hacked by a malicious actor, the hacker will not be able to interact with the host operating system or other containers on the same server. The hacker will be trapped in the container, and will only have access to the files and processes within it.

In this way, you can protect your server and other applications from being compromised or damaged by a security breach.

How to Upgrade to RunCloud Docker

As we mentioned earlier, if you are using the native variant of RunCloud and want to upgrade to RunCloud Docker, you’ll need to create a new server with Docker, and clone your existing applications from your old server to your new server.

If you don’t have a server with Docker installed, go back to the How To Use Docker On RunCloud section.   

Here are the steps to upgrade from the native servers to RunCloud Docker:

  1. Once your new server is ready, you can clone your existing applications from your old server to your new server. To do this, go to the Applications tab on your old server and click on the “Cloning” button. You need to do this individually for each application that you want to clone.

In the above example, the server using Nginx was named “nginx” and the server using Docker was named “docker” for demonstration purposes. These names will vary depending upon your setup.

  1. Choose your new server as the destination, and enter a name for the cloned application. You can also choose whether to clone the database and the files of the application. If you are cloning a web application that relies on a database (e.g. WordPress), you must select this option.

Select the database that you want to clone from the drop down menu. The name of the database is generally similar to the name of the application. After this, provide a new name for your database and web application – this will be displayed in the RunCloud dashboard under your new server.

  1. After this, you need to select the user account on your server that will be the owner of your web application. You can either pick one of the existing users, or create a new user.
  1. Finally, you need to configure the domain name of your application. We recommend using a test domain during migration. This will allow you to access your containerized application and, in the meantime, all the existing traffic will continue to go to your old servers. Once you are satisfied, you can update your test domain
  2. Click on the Clone Application button and wait for RunCloud to clone your application to your new server. Repeat the above steps for each application you want to clone from your old server to your new server.
  3. Once you have cloned all your applications, you’ll need to update the DNS records of your domains to point to your new server. To do this, you can either use RunCloud’s Cloudflare integration, or go to your domain registrar or DNS provider and change the A records or CNAME records of your domains to point to the IP address of your new server.
  4. Wait for the DNS changes to propagate, and verify that your applications are working properly on your new server. If you are planning this ahead of time, you should also read our guide on How To Speed Up DNS Propagation.

You have successfully upgraded from the native variant to Containerized Core.

You can now enjoy the benefits of using Docker containers on your new server. You can also log in to your server via SSH to access your new server, and manage your containers via Docker CLI. 

Conclusion

Docker is an incredibly powerful tool for creating and running applications in containers. With this improvement to RunCloud’s core powered by containerization – we’re beyond excited for you all to take advantage of the benefits of containerization as well as what this means for the future of managing your infrastructure on RunCloud.

The RunCloud team is committed to delivering the best possible experience to our users across the board. We welcome your feedback and suggestions on how to make it better for you. Please feel free to reach out to us, or join our community forum to share your thoughts and experiences.

You don’t need to be a Linux expert anymore to enjoy the benefits of Docker. With RunCloud, you can create and run isolated web applications with just a few clicks.

Sign up today and see for yourself how easy and convenient it is to use Docker on RunCloud.