Docker is a platform that lets you build, distribute, and run applications in containers. This allows you to package an application together with its dependencies and run it easily in different environments.
Images and containers
Two terms you will often hear when talking about Docker are images and containers. Although they are related, they do not mean the same thing.
An image is a template containing the files, dependencies, and configuration needed to run an application. It can be based on a distribution such as Ubuntu or Debian, although not every image needs to include the tools usually found in a distribution.
A container is an instance of an image, with its own configuration and a writable layer for changes made during use. You can create several containers from the same image and run them independently.
You can also share your images through a registry such as Docker Hub or use a private registry for your projects.
Virtual machines vs Docker
Unlike a virtual machine, which runs a complete operating system with its own kernel, Docker Linux containers share the host system's kernel. Each container keeps its processes isolated and uses the applications and dependencies included in its image.
In terms of disk storage, a virtual machine needs space for its own operating system. Docker images are usually smaller and can share layers, avoiding storing the same files several times. The space they use depends on the applications and dependencies they include.
In terms of processor and RAM usage, containers usually have less overhead than virtual machines because they do not need to run a separate kernel for each container. Resource usage depends on the applications you run, and you can also configure resource limits for each container.
You can also combine both technologies: you can run Docker inside your Cloud VPS to organise your server's applications into containers.
Docker image on Clouding
At Clouding, you can choose an image with Docker preinstalled on Ubuntu, so you can start working on your projects without installing it manually.
Check the available versions when creating your server in the customer panel and select the Docker image that meets your needs.
If you prefer to install it yourself, below we explain how to do so on Ubuntu, Debian, AlmaLinux 10, and Windows Server Datacenter.
Installing Docker on Ubuntu, Debian, and AlmaLinux 10
The following steps are intended for a new installation of Docker Engine on a server. They also include Docker Buildx and the Docker Compose plugin.
Connect to your server via SSH as root. The “#” symbol before each command indicates that it is run as this user; you do not need to copy it.
If your server already has Docker, Podman, or another container system installed, review the existing packages and services before continuing to avoid conflicts. If it hosts important applications or data, create a backup.
Installing Docker on Ubuntu
You can follow these steps on Ubuntu 24.04 LTS and Ubuntu 26.04 LTS. We will use Docker's official repository to install its packages.
First, update the package list and install the required tools:
# apt update
# apt install ca-certificates curlAdd the signing key for Docker's repository:
# install -m 0755 -d /etc/apt/keyrings
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
# chmod a+r /etc/apt/keyrings/docker.ascNext, run the complete block to configure the repository for your Ubuntu version. The “#” symbol only marks the start of the command; the following lines up to “EOF” are part of it:
# cat > /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOFUpdate the package list and install Docker:
# apt update
# apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginInstalling Docker on Debian
You can follow these steps on Debian 12 and Debian 13.
First, update the package list and install the required tools:
# apt update
# apt install ca-certificates curlAdd the signing key for Docker's repository:
# install -m 0755 -d /etc/apt/keyrings
# curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
# chmod a+r /etc/apt/keyrings/docker.ascRun the complete block to configure the repository for your Debian version, without copying the initial “#” symbol:
# cat > /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOFUpdate the package list and install Docker:
# apt update
# apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginInstalling Docker on AlmaLinux 10
On AlmaLinux 10, we will use Docker's repository for RHEL 10. This procedure adapts the RHEL instructions for AlmaLinux; it does not mean that Docker includes AlmaLinux among its officially supported distributions.
First, install the plugin used to manage repositories:
# dnf install dnf-plugins-coreAdd Docker's repository:
# dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repoInstall Docker and its plugins:
# dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginDuring installation, you may be asked to accept the repository's signing key. Before accepting it, check that its fingerprint matches the one published in the official Docker documentation for RHEL.
Starting Docker and checking the installation on Linux
Once installation is complete on any of the distributions above, start the service and enable it to start automatically at boot:
# systemctl enable --now dockerCheck that the service is active:
# systemctl is-active dockerIf you see “active”, the service is running. Next, run the test container:
# docker run --rm hello-worldDocker will download the test image and run a container. If everything works correctly, you will see “Hello from Docker!”. The container will be removed automatically when it finishes.
You can also check the installed versions of Docker and Docker Compose:
# docker version
# docker compose versionAllowing another user to use Docker
This step is optional. If you later want to manage Docker with a user other than root, you can add an existing user to the “docker” group:
# usermod -aG docker usernameReplace “username” with the user's name. This command does not create a new account; it adds the specified account to the group.
If that user already has an open session, they will need to log out and reconnect for the changes to take effect. They can then check access by running “docker run --rm hello-world” from their session.
Important: membership in the “docker” group grants privileges equivalent to administrator access on the server. Only add trusted users.
Checking container ports on Linux
When publishing a container port, check which addresses can access it. Docker configures its own network rules, and published ports may be accessible even if you expect a UFW rule to block them.
Check Docker's configuration, the server firewall, and the Clouding firewall. You can find more details in the Docker firewall documentation.
Installing Docker Engine on Windows Server Datacenter
On Windows Server Datacenter, you can install Docker Engine to run Windows containers and manage them using PowerShell commands.
Below, we explain how to prepare a server running Windows Server 2022 Datacenter or Windows Server 2025 Datacenter using the Docker CE/Moby installation script provided by Microsoft.
This installation lets you run Windows containers. If your applications use Linux images, such as Ubuntu, Debian, or Alpine, you can deploy them on a Linux VPS by following the previous sections.
Preparing the server
Before you start, install any pending Windows updates and create a backup if the server contains important applications or data. Installation may require a restart, so choose a time when you can interrupt the service.
Access your server and open “Windows PowerShell” using the “Run as administrator” option.
In this procedure, containers will share the server's Windows kernel while keeping their processes isolated. This mode is called “process isolation” and does not require installing Hyper-V.
If you need Hyper-V isolation inside a VPS, you must first confirm that nested virtualisation is available. The Datacenter edition alone does not guarantee that this feature is available on your VPS.
Downloading the installation script
Create a folder to store the installer and open it:
# New-Item -ItemType Directory -Path C:\DockerInstall -Force
# Set-Location C:\DockerInstallDownload the script from Microsoft's repository:
# Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -OutFile "install-docker-ce.ps1"You can open it in Notepad to review its contents before running it:
# notepad .\install-docker-ce.ps1Installing Docker Engine
Once you have reviewed the file, unblock it and run the installer:
# Unblock-File .\install-docker-ce.ps1
# .\install-docker-ce.ps1 -NoRestartThe script enables the features needed for containers and installs Docker Engine. The “-NoRestart” parameter prevents it from restarting the server automatically.
If PowerShell reports that script execution is disabled, you can allow local scripts for this session using the following command, provided your organisation's policies allow it:
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSignedThen run the installer again:
# .\install-docker-ce.ps1 -NoRestartIf the script reports that a restart is needed, restart the server when you can interrupt the service. Then reopen “Windows PowerShell” as administrator and run the script again to complete installation:
# Set-Location C:\DockerInstall
# .\install-docker-ce.ps1 -NoRestartChecking the Docker service
Once installation is complete, close and reopen PowerShell as administrator to refresh the command search path.
Configure the service to start automatically and start it if it is not already running:
# Set-Service -Name docker -StartupType Automatic
# Start-Service -Name docker
# Get-Service -Name dockerThe service should show a status of “Running”. Also check that the client can communicate with Docker Engine:
# docker versionThe output should include both the “Client” and “Server” sections.
Running your first Windows container
To check that Docker works, we will run a test container using Nano Server, a minimal version of Windows for containers.
Your server will continue to use Windows Server Datacenter. Nano Server will only be the base for the test container. We will choose an image compatible with your server's Windows Server version.
If you use Windows Server 2022 Datacenter, run:
# docker run --rm --isolation=process mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c echo Hello from Docker on Windows ServerIf you use Windows Server 2025 Datacenter, run:
# docker run --rm --isolation=process mcr.microsoft.com/windows/nanoserver:ltsc2025 cmd /c echo Hello from Docker on Windows ServerDocker will download the image the first time, so the process may take a few minutes. If everything works correctly, you will see “Hello from Docker on Windows Server”, and the container will be removed when it finishes.
For your own applications, choose an image that includes their required dependencies and is compatible with the server. Not every Windows application can run on Nano Server; some need an image such as Windows Server Core.
You can check the available combinations in the Windows container compatibility table.
Important: this procedure installs the community edition of Docker Engine. If you need commercial support for the container runtime, review the available support options and terms before using it in production.
And that’s it! You now have the foundations to start deploying your applications with Docker and bring your next projects to life 🙂
Remember, if you have any questions about this or any other matter related to your servers at Clouding, feel free to email soporte@clouding.io We’re here for whatever you need. Just ask us!