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
sudoorrootpermission.
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 $USERCentOS/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 $USERVerify Compose v2:
bash
docker compose versionVerification
bash
docker run --rm hello-world
docker compose versionFAQ
- After joining the
dockergroup, 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.