Skip to content

Offline Docker Installation

Download Installation Package

Official Website: https://download.docker.com/linux/static/stable/x86_64/

shell
# x86 Architecture
wget https://download.docker.com/linux/static/stable/x86_64/docker-27.1.0.tgz
# arm Architecture
wget https://download.docker.com/linux/static/stable/aarch64/docker-27.1.0.tgz

Extract and Copy

shell
sudo tar -zxvf docker-27.1.0.tgz
sudo cp docker/* /usr/bin/

Write Configuration File

shell
sudo vim /etc/systemd/system/docker.service

Write the following content:

shell
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

Set Executable Permission and Reload systemd Configuration

shell
sudo chmod +x /etc/systemd/system/docker.service
sudo systemctl daemon-reload

Set Docker to Start on Boot

shell
sudo systemctl enable docker.service

Start Docker

shell
sudo systemctl start docker

Check Docker Service Status

shell
sudo systemctl status docker