Skip to content

Install Docker

Goal

Install Docker and Docker Compose on a Linux server before deploying Sa2web.

Prerequisites

  • The server can access package repositories or has offline installation packages.
  • The current user has sudo or root permission.

Steps

Ubuntu/Debian example:

bash
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER

CentOS/RHEL example:

bash
sudo yum install -y yum-utils
curl -fsSL https://get.docker.com | sudo sh
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

Verify Compose v2:

bash
docker compose version

Verification

bash
docker run --rm hello-world
docker compose version

FAQ

  • After joining the docker group, log in to the shell again.
  • Production servers should configure Docker log rotation to avoid filling the disk.
  • Offline environments should prepare Docker, the Compose plugin, and product images in advance.

Sa2web 1.0.0