docker 安裝

版本docker-ce17

Uninstall old versions

Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them, along with associated dependencies.

                  docker-common \
                  container-selinux \
                  docker-selinux \
                  docker-engine```
It’s OK if yum reports that none of these packages are installed.

The contents of ```/var/lib/docker/```, including images, containers, volumes, and networks, are preserved. The Docker CE package is now called ```docker-ce```, and the Docker EE package is now called ```docker-ee```.

####Install Docker
You can install Docker in different ways, depending on your needs:

1.Most users [set up Docker’s repositories](https://docs.docker.com/engine/installation/linux/#install-using-the-repository) and install from them, for ease of installation and upgrade tasks. This is the recommended approach.

2.Some users download the RPM package and install it manually and manage upgrades completely manually. This is useful in situations such as installing Docker on air-gapped systems with no access to the internet.

####Install using the repository
Before you install Docker for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.
SET UP THE REPOSITORY
Repository set-up instructions are different for [Docker CE](https://docs.docker.com/engine/installation/linux/#docker-ce) and [Docker EE](https://docs.docker.com/engine/installation/linux/#docker-ee).
####Docker CE

Install yum-utils, which provides the yum-config-manager utility:
```$ sudo yum install -y yum-utils```

Use the following command to set up the **stable** repository. You always need the **stable** repository, even if you want to install **edge** builds as well.
```$ sudo yum-config-manager  --add-repo \https://download.docker.com/linux/centos/docker-ce.repo```

**Optional**: Enable the **edge** repository. This repository is included in the docker.repo
 file above but is disabled by default. You can enable it alongside the stable repository.
```$ sudo yum-config-manager --enable docker-ce-edge```

You can disable the **edge** repository by running the yum-config-manager
command with the --disable
 flag. To re-enable it, use the --enable
 flag. The following command disables the **edge** repository.
```$ sudo yum-config-manager --disable docker-ce-edge```

[Learn about **stable** and **edge** builds](https://docs.docker.com/engine/installation/).
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 注:原文地址:http://severalnines.com/blog/mysql-docker-containe...
    空亂木閱讀 6,157評論 0 7
  • Docker 是一個開源的應(yīng)用容器引擎,讓開發(fā)者可以打包他們的應(yīng)用以及依賴包到一個可移植的容器中,然后發(fā)布到任何流...
    ProteanBear閱讀 1,453評論 0 3
  • Docker是現(xiàn)在比較流行的部署Web應(yīng)用平臺,但是現(xiàn)在對其的中文說明較少,特別是安裝部分,所以做該篇以記錄。 D...
    slords閱讀 1,496評論 0 3
  • Docker 簡介 Docker官網(wǎng)Docker GithubDocker —— 從入門到實踐Docker是一個開...
    Cursor_fei閱讀 956評論 0 0
  • 林落落是在宋玦離開的第485天收到那張大紅的結(jié)婚請柬的。 正正好一年零四個月,已經(jīng)過去那么久了呢,林落落心里想。 ...
    肖小只閱讀 315評論 0 0

友情鏈接更多精彩內(nèi)容