Docker is a platform that allows you to create and run applications using containers, which are isolated and lightweight environments that share the same operating system kernel.

What are Docker services?

A service is a unit of deployment that defines which container image to use, which commands to execute inside the container, and other options such as:

  • The port where the service is accessible
  • The network where the service connects to other services
  • The CPU and memory limits for the service

On RunCloud, you have the option to directly access the Docker services via CLI. Just log into your server via SSH and start using commands such as docker service ls or docker service inspect.

List Docker services on RunCloud

The above screenshot displays the list of services running on the Docker along with their ID, Name, Mode, Replicas, Image, and Ports being used.

Inspect Docker services on RunCloud

The list command is useful but you can further inspect each Docker service by using the inspect command, and passing either the name or the ID of the service that you want to inspect.

How to use Docker services with RunCloud?

RunCloud allows you to manage your web applications using Docker with an interactive user interface. RunCloud only tracks NGiNX, Apache2, MariaDB, Supervisord, Redis, New Relic, Memcached and Beanstalkd services on the dashboard.

Adding/Removing Services

You can start, stop, and reload any services that you want from the RunCloud dashboard. Just click on the “” button on the service that you want to modify and then select “Add to stack” or “Remove from stack“. This will change the status from “Available” to “Not Yet Deployed“.

Adding or Removing services on RunCloud docker

Once you have configured all of the changes, click on “Deploy” to save the changes.

Adding the PHP Version

With RunCloud, you can also choose your own PHP version and customize your PHP extensions for each service. Here are the steps to do that:

  1. Choose the PHP version that you want to add, then click on the 3 dots and select “Add to Stack“.
Changing PHP version on Docker
  1. In the Docker environment section, you can customize the PHP modules that you want to enable or disable, and add your New Relic key and app name if you want to use New Relic for monitoring.
PHP environment variables on Docker
  1. Click “Add to Stack
  2. Click on “Deploy” to save the changes.

Upgrading/Downgrading MariaDB

If you want to use a different version of MariaDB in your Docker containers, you can do so by selecting the desired version in the “Services” section.

However, you should be careful not to downgrade the MariaDB version after you have upgraded it, because this could cause your database to crash and become irreparable.

Changing MariaDB version on RunCloud

Note: By default, the database for MariaDB and Beanstalkd doesn’t update automatically, because this would cause a brief downtime (about 5-10 seconds). Therefore, it is recommended that you disable the auto update option for these services.