Docker lets you run applications in containers. It is commonly used for bots, web apps, databases, dashboards, and some self-hosted game tooling. Do not install Docker if a game guide tells you to use a normal native server install instead.

Take a backup before installing Docker on a VPS that already hosts live services. Docker can create networks, firewall rules, volumes, and service files.

  1. Connect to the VPS with SSH.
  2. On Ubuntu or Debian, update packages and install Docker:
    sudo apt update
    sudo apt install docker.io docker-compose-v2
    sudo systemctl enable --now docker

    Linux VPS terminal showing Docker installed and docker version output

  3. On AlmaLinux, Rocky Linux, Oracle Linux, or CentOS-style images, install Docker if it is available from your enabled repositories:
    sudo dnf install docker docker-compose-plugin
    sudo systemctl enable --now docker
  4. If your distribution does not provide Docker in its default repositories, use Docker's official installation documentation for that distribution.
  5. Test Docker:
    sudo docker run hello-world
  6. Optionally allow your normal user to run Docker, then log out and back in:
    sudo usermod -aG docker yourusername

 

Useful Docker commands

CommandWhat it does
docker psShows running containers.
docker ps -aShows all containers, including stopped ones.
docker logs container_nameShows logs for a container.
docker compose up -dStarts a Compose stack in the background.

Docker containers can expose ports, write files, and consume disk space quickly, so keep backups of important data volumes.

  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

How to connect to a Linux VPS with SSH

SSH is the normal way to manage a Linux VPS. It gives you a terminal on the server so you can...

How to update packages on a Linux VPS

Keeping packages updated helps patch security issues and keeps server tools compatible. Run...

How to create a sudo user on a Linux VPS

A sudo user lets you manage a Linux VPS without logging in as root for every task. This is safer...

How to secure SSH on a Linux VPS

SSH is the main way to manage a Linux VPS, so it should be secured before the server is used for...

How to check disk usage on a Linux VPS

Disk usage issues can stop updates, backups, logs, databases, and game saves from writing...