Video failed to load

Install Docker / Docker Compose

161 words
1 minute
Install Docker / Docker Compose
Install Docker / Docker Compose

Translation Notice

This article was originally written in Chinese and translated into English with the assistance of AI. The translation has been reviewed and edited for clarity, accuracy, and readability. Please refer to the original source where necessary, especially for technical terms, commands, configuration details, and proper nouns.

This guide covers online and offline installation of Docker and Docker Compose on Linux, for users without Internet access or deploying in an internal network.

🌐 Online Installation#

Method 1#

Terminal window
curl -fsSL https://get.docker.com -o get-docker.shsh
get-docker.sh
sudo apt-get install libffi-dev libssl-dev。
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Method 2#

Terminal window
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)

📦 Offline Installation#

  1. Download the binaries.
wget https://download.docker.com/linux/static/stable/x86_64/docker-24.0.6.tgz
wget https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64
  1. Extract and install Docker.
Terminal window
tar -xvzf docker-24.0.6.tgz
sudo cp docker/* /usr/bin/
  1. Create the service.
Terminal window
sudo tee /etc/systemd/system/docker.service > /dev/null <<EOF
[Unit]
Description=Docker Service
After=network.target
[Service]
ExecStart=/usr/bin/dockerd
Restart=always
[Install]
WantedBy=multi-user.target
EOF
# Start Docker
sudo systemctl daemon-reexec
sudo systemctl enable docker
sudo systemctl start docker
  1. Install Docker Compose.
Terminal window
sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
  1. Verify the installation.
Terminal window
docker -v
docker-compose -v

Support & Share

If this article helped you, please share or support!

Sponsor
Install Docker / Docker Compose
https://blog.bytesycn.cn/posts/ec661856-ac41-4faa-9c35-33405bb802b1/
Author
Ryan Zhang
Published at
2025-06-14
Related PostsSmart
1
OpenSSH Security Upgrade Guide: Online and Offline Methods
TutorialOpenSSH is a core component for remote server access and administration. Its open-source nature sometimes exposes security vulnerabilities, but also drives continuous improvement. Upgrading is the most effective response, yet many Linux servers run in isolated environments and cannot update directly over the network. This guide explains how to securely upgrade OpenSSH by compiling and installing it offline.
2
Installing an FTP Service on XC Operating Systems
TutorialA practical guide to deploying an FTP server in an XC environment, covering the complete process of installing, configuring, and hardening vsftpd.
3
TOTP Two-Factor Authentication for Windows Remote Logins
TutorialAdd TOTP-based two-factor authentication to Windows Remote Desktop (RDP) with multiOTP to improve remote-login security. Supports mainstream authenticators such as Google Authenticator and Tencent Authenticator.
4
🐾 OpenClaw Installation Guide and Personal Thoughts — 2026.03
TutorialA detailed guide to OpenClaw 2026.03, covering one-click Linux deployment, Feishu bot long connections, and local-model integration. It explores the security philosophy of private AI, emphasizing least privilege and data boundaries so idle hardware can become a powerful private assistant without sacrificing privacy.
5
After MinIO's Web Console Disappeared, It's Time for the CLI: An Introduction to mc
TutorialIn MinIO's community releases after 20250524, the open-source object-storage giant radically removed the core Web management console—deleting 110,000 lines of code. How can you manage MinIO with mc without a Web Console?
Random PostsRandom

Comments

Profile Image of the Author
Ryan Zhang
Keep building, keep thinking, keep creating.
Announcement
Welcome to my blog!
Categories
Tags
Latest Moments
Site Statistics
Posts
30
Categories
7
Tags
42
Total Words
117,260
Running Days
0 days
Last Activity
0 days ago
Table of Contents