This guide includes online and offline installation methods for installing Docker and Docker Compose on Linux systems, suitable for users who cannot access the external network or need to deploy in an internal network environment.
🌐 Online Install
Method 1
1 | curl -fsSL https://get.docker.com -o get-docker.shsh |
Method 2
1 | bash <(curl -sSL https://linuxmirrors.cn/docker.sh) |
📦 Offline Install
1、Download binary files
1 | wget https://download.docker.com/linux/static/stable/x86_64/docker-24.0.6.tgz |
2、Extract and install Docker
1 | tar -xvzf docker-24.0.6.tgz |
3、Create Service
1 | sudo tee /etc/systemd/system/docker.service > /dev/null <<EOF |
4、Install Docker Compose
1 | sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose |
5、Verify Install Result
1 | docker -v |