# install-docker
**Repository Path**: dyrnq/install-docker
## Basic Information
- **Project Name**: install-docker
- **Description**: bash scripts install docker
- **Primary Language**: Shell
- **License**: GPL-3.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 5
- **Forks**: 1
- **Created**: 2021-02-15
- **Last Updated**: 2026-06-26
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# install-docker.sh
This is a script to install docker binaries. It can help you quickly extract the docker binaries from various mirrors without the steps of setting up the repository.
Supports installation on more operating systems, centos, debian, ubuntu, openSUSE, Kali, archlinux, manjaro, gentoo, Alpine, voidlinux, artixlinux, antixlinux.
Support docker-compose binary installation.
Support docker buildx binary installation.
Support systemd、openrc、runit.
## Quickstart
```bash
curl -fsSL https://ghfast.top/https://raw.githubusercontent.com/dyrnq/install-docker/main/install-docker.sh | bash -s docker \
--mirror Tuna \
--version 29.6.0
```
or with docker-compose
```bash
curl -fsSL https://cdn.jsdelivr.net/gh/dyrnq/install-docker@main/install-docker.sh | bash -s docker \
--mirror Tuna \
--version 29.6.0 \
--with-compose \
--compose-version v5.2.0 \
--compose-mirror daocloud
```
or with docker-compose plugin
```bash
mkdir -p /usr/local/lib/docker/cli-plugins
curl -fsSL https://ghfast.top/https://raw.githubusercontent.com/dyrnq/install-docker/main/install-docker.sh | bash -s docker \
--mirror tencent \
--version 29.6.0 \
--with-compose \
--compose-version v5.2.0 \
--compose-mirror daocloud \
--compose-prefix /usr/local/lib/docker/cli-plugins \
--systemd-mirror "ghproxy"
```
or with buildx
```bash
curl -fsSL https://cdn.jsdelivr.net/gh/dyrnq/install-docker@main/install-docker.sh | bash -s docker \
--mirror Tuna \
--version 29.6.0 \
--with-buildx \
--buildx-version v0.20.1 \
--buildx-mirror daocloud
```
or with buildx plugin
```bash
mkdir -p /usr/local/lib/docker/cli-plugins
curl -fsSL https://cdn.jsdelivr.net/gh/dyrnq/install-docker@main/install-docker.sh | bash -s docker \
--mirror Tuna \
--version 29.6.0 \
--with-buildx \
--buildx-version v0.20.1 \
--buildx-mirror daocloud \
--buildx-prefix /usr/local/lib/docker/cli-plugins
```
## Get
```bash
git clone --depth 1 https://github.com/dyrnq/install-docker.git
```
or
```bash
curl -fsSL -O https://raw.githubusercontent.com/dyrnq/install-docker/main/install-docker.sh
or
curl -fsSL -O https://cdn.jsdelivr.net/gh/dyrnq/install-docker@main/install-docker.sh
or
curl -fsSL -O https://ghfast.top/https://raw.githubusercontent.com/dyrnq/install-docker/main/install-docker.sh
chmod +x ./install-docker.sh
```
## Usage
- --version
```bash
./install-docker.sh --mirror Tuna --version 29.6.0 --prefix /usr/local/bin
```
- --mirror
| mirror | mirror web address |
| ----------- | ------------------------------------------------- |
| aliyun | |
| 163 | |
| tencent | |
| huaweicloud | |
| tuna | |
| tsinghua | |
| nyist | |
| ustc | |
| sjtu | |
| zju | |
| nju | |
| ~~njupt~~ | |
| bfsu | |
| nwafu | |
| sustech | |
| xjtu | |
| hit | |
| hust | |
| xtom | |
| pku | |
| ~~ynu~~ | |
| ~~bupt~~ | |
| njtech | |
| ~~qlu~~ | |
- --with-compose
```bash
./install-docker.sh --mirror Tuna --version 29.6.0 --prefix /usr/local/bin --with-compose --compose-version v5.2.0 --compose-mirror daocloud --compose-prefix /usr/local/bin
```
- --with-buildx
```bash
./install-docker.sh --mirror Tuna --version 29.6.0 --prefix /usr/local/bin --with-buildx --buildx-version v0.20.1 --buildx-mirror daocloud --buildx-prefix /usr/local/bin
```
- --dry-run
```bash
./install-docker.sh --mirror Tuna --dry-run
```
## Command-Line Options
| Name | Description | Default |
| -------------------- | ------------------------------------------- | -------------- |
| --mirror | mirror of docker binary download url | |
| --prefix | docker binary installation directory | /usr/local/bin |
| --version | docker binary version | 29.6.0 |
| --with-compose | install docker-compose | |
| --compose-prefix | docker-compose installation directory | /usr/local/bin |
| --compose-version | docker-compose version | v5.2.0 |
| --compose-mirror | mirror of docker-compose download url | |
| --with-buildx | install docker buildx | |
| --buildx-prefix | buildx installation directory | /usr/local/bin |
| --buildx-version | buildx version | v0.20.1 |
| --buildx-mirror | mirror of buildx download url | |
| --systemd-mirror | mirror of dockerd`s systemd unit files | jsdelivr |
| --no-systemd | do not install dockerd`s systemd unit files | |
| --daemon-json | daemon.json path or url | |
| --daemon-json-prefix | daemon.json path | /etc/docker |
| --no-daemon-json | do not install daemon.json | |
| --with-openrc | will install dockerd`s init.d files | |
| --openrc-mirror | mirror of dockerd`s init.d files | jsdelivr |
| --with-runit | will install dockerd`s runit files | |
| --runit-mirror | mirror of dockerd`s runit files | jsdelivr |
| --proxy | HTTP/HTTPS proxy passed to every curl call | |
| --noproxy | comma-separated hosts to bypass the proxy | |
| --dry-run | dry run | |
| --override-existing | override existing | |
## Tks
- [https://get.docker.com/](https://get.docker.com/)
- [https://mirrorz.org/](https://mirrorz.org/)
-
-