Important Note: This document provides detailed steps for Docker environment installation, only for users who need to install Docker. If you already have Docker environment, you can skip this document.
Docker and Docker Compose are core dependencies for running Nuwax services and must be installed correctly. The following provides detailed installation steps for various mainstream operating systems.
- Ensure sufficient disk space (at least 10GB available space)
- Linux recommends using Ubuntu 22.04 LTS
- System restart may be required during installation
- Mainland China users are recommended to configure mirror accelerators
You can refer to the official Docker installation documentation (Install Docker and Install Docker Compose), or you can directly use the following commands to try the installation.
sudo apt updatesudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-releasecurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpgecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-pluginsudo systemctl start docker
sudo systemctl enable dockersudo usermod -aG docker $USER# Need to re-login or run the following command
newgrp docker
docker --version
docker compose versionYou can refer to the official Docker installation documentation (Install Docker Desktop on Mac), or you can directly use the following methods.
OrbStack is a lightweight Docker alternative, free for personal use, with better performance and lower resource usage.
- Visit OrbStack official website
- Download and install OrbStack
- After starting OrbStack, it automatically supports
dockeranddocker composecommands - Verify installation:
docker --version docker compose version
- Visit Docker Desktop official website
- Download the version suitable for your Mac (Intel or Apple Silicon)
- Double-click the installer to install
- Start Docker Desktop
- Verify installation:
docker --version docker compose version
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install OrbStack
brew install orbstack
# Start OrbStack
open /Applications/OrbStack.app- Visit Docker Desktop official website
- Download the version suitable for your Windows
- Run the installer and follow the prompts to complete the installation
- Start Docker Desktop
- Verify installation:
docker --version docker compose version
Mainland China users are recommended to configure mirror accelerators
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker- Open OrbStack
- Go to Settings
- Select Docker
- Add to Registry Mirrors:
https://docker.mirrors.ustc.edu.cn https://hub-mirror.c.163.com https://mirror.baidubce.com - Click save and restart
- Open Docker Desktop
- Go to Settings/Preferences
- Select Docker Engine
- Add to configuration:
{ "registry-mirrors": [ "https://docker.mirrors.ustc.edu.cn", "https://hub-mirror.c.163.com", "https://mirror.baidubce.com" ] } - Click Apply & Restart
Run the following commands to verify Docker is installed correctly:
# Check Docker version
docker --version
# Check Docker Compose version
docker compose version
# Run hello-world test
docker run hello-world
# Check Docker service status
docker infoIf all commands run successfully, it means Docker environment has been installed successfully.
A: User doesn't have Docker permissions, need to add user to docker group:
sudo usermod -aG docker $USER
Then re-login or execute: newgrp docker
A: Check system logs: sudo journalctl -u docker.service
Common solutions:
- Clean Docker data: sudo rm -rf /var/lib/docker
- Reinstall Docker
A: Check firewall settings:
- Ubuntu: sudo ufw status
- Temporarily disable firewall for testing: sudo ufw disable
A: Clean Docker data:
- Clean unused images: docker system prune
- Clean all data: docker system prune -a
- Check disk usage: docker system df
A: Check container logs:
- Check container status: docker ps -a
- Check container logs: docker logs <container_name>
- Check port usage: netstat -tlnp | grep :80
After Docker environment installation is complete, please return to Nuwax Installation & Deployment Documentation to continue deploying Nuwax services.