replace docker store with docker hub

pull/382/head
khs1994 2018-12-14 19:08:14 +08:00
parent 3b798d1e64
commit a50641d973
No known key found for this signature in database
GPG Key ID: 0A380828B1C243A7
15 changed files with 24 additions and 26 deletions

View File

@ -1,6 +1,6 @@
# Docker — 从入门到实践
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) [![](https://img.shields.io/docker/pulls/yeasy/docker_practice.svg)](https://store.docker.com/community/images/yeasy/docker_practice) [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=master)](https://travis-ci.org/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://badges.gitter.im/docker_practice/Lobby.svg)](https://gitter.im/docker_practice/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) ![](https://img.shields.io/docker/pulls/yeasy/docker_practice.svg) [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=master)](https://travis-ci.org/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://badges.gitter.im/docker_practice/Lobby.svg)](https://gitter.im/docker_practice/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
v1.0.0

View File

@ -1,10 +1,10 @@
## [CentOS](https://store.docker.com/images/centos/)
## [CentOS](https://hub.docker.com/_/centos)
### 基本信息
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
该仓库位于 https://store.docker.com/images/centos/ ,提供了 CentOS 从 5 ~ 7 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/centos` ,提供了 CentOS 从 5 ~ 7 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [MongoDB](https://store.docker.com/images/mongo/)
## [MongoDB](https://hub.docker.com/_/mongo/)
### 基本信息
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是开源的 NoSQL 数据库实现。
该仓库位于 https://store.docker.com/images/mongo/ ,提供了 MongoDB 2.x ~ 3.x 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/mongo/` ,提供了 MongoDB 2.x ~ 3.x 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [MySQL](https://store.docker.com/images/mysql/)
## [MySQL](https://hub.docker.com/_/mysql/)
### 基本信息
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。
该仓库位于 https://store.docker.com/images/mysql/ ,提供了 MySQL 5.5 ~ 8.x 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/mysql/` ,提供了 MySQL 5.5 ~ 8.x 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [Nginx](https://store.docker.com/images/nginx/)
## [Nginx](https://hub.docker.com/_/nginx/)
### 基本信息
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。
该仓库位于 https://store.docker.com/images/nginx/ ,提供了 Nginx 1.0 ~ 1.13.x 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/nginx/` ,提供了 Nginx 1.0 ~ 1.13.x 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [Node.js](https://store.docker.com/images/node/)
## [Node.js](https://hub.docker.com/_/node/)
### 基本信息
[Node.js](https://en.wikipedia.org/wiki/Node.js) 是基于 JavaScript 的可扩展服务端和网络软件开发平台。
该仓库位于 https://store.docker.com/images/node/ ,提供了 Node.js 0.10 ~ 9.x 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/node/` ,提供了 Node.js 0.10 ~ 9.x 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [Redis](https://store.docker.com/images/redis/)
## [Redis](https://hub.docker.com/_/redis/)
### 基本信息
[Redis](https://en.wikipedia.org/wiki/Redis) 是开源的内存 Key-Value 数据库实现。
该仓库位于 https://store.docker.com/images/redis/ ,提供了 Redis 3.x ~ 4.x 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/redis/` ,提供了 Redis 3.x ~ 4.x 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [Ubuntu](https://store.docker.com/images/ubuntu/)
## [Ubuntu](https://hub.docker.com/_/ubuntu/)
### 基本信息
[Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。
该仓库位于 https://store.docker.com/images/ubuntu/ ,提供了 Ubuntu 从 12.04 ~ 18.04 各个版本的镜像。
该仓库位于 `https://hub.docker.com/_/ubuntu/` ,提供了 Ubuntu 从 12.04 ~ 18.04 各个版本的镜像。
### 使用方法

View File

@ -1,10 +1,10 @@
## [WordPress](https://store.docker.com/images/wordpress/)
## [WordPress](https://hub.docker.com/_/wordpress/)
### 基本信息
[WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PHP 和 MySQL。
该仓库位于 https://store.docker.com/images/wordpress/ ,提供了 WordPress 4.x 版本的镜像。
该仓库位于 `https://hub.docker.com/_/wordpress/` ,提供了 WordPress 4.x 版本的镜像。
### 使用方法

View File

@ -5,8 +5,6 @@
* Docker 官方主页https://www.docker.com
* Docker 官方博客https://blog.docker.com/
* Docker 官方文档https://docs.docker.com/
* Docker Storehttps://store.docker.com
* Docker Cloudhttps://cloud.docker.com
* Docker Hubhttps://hub.docker.com
* Docker 的源代码仓库https://github.com/moby/moby
* Docker 发布版本历史https://docs.docker.com/release-notes/

View File

@ -6,7 +6,7 @@
通常,一个仓库会包含同一个软件不同版本的镜像,而标签就常用于对应该软件的各个版本。我们可以通过 `<仓库名>:<标签>` 的格式来指定具体是这个软件哪个版本的镜像。如果不给出标签,将以 `latest` 作为默认标签。
以 [Ubuntu 镜像](https://store.docker.com/images/ubuntu) 为例,`ubuntu` 是仓库的名字,其内包含有不同的版本标签,如,`16.04`, `18.04`。我们可以通过 `ubuntu:14.04`,或者 `ubuntu:18.04` 来具体指定所需哪个版本的镜像。如果忽略了标签,比如 `ubuntu`,那将视为 `ubuntu:latest`
以 [Ubuntu 镜像](https://hub.docker.com/_/ubuntu) 为例,`ubuntu` 是仓库的名字,其内包含有不同的版本标签,如,`16.04`, `18.04`。我们可以通过 `ubuntu:14.04`,或者 `ubuntu:18.04` 来具体指定所需哪个版本的镜像。如果忽略了标签,比如 `ubuntu`,那将视为 `ubuntu:latest`
仓库名经常以 *两段式路径* 形式出现,比如 `jwilder/nginx-proxy`,前者往往意味着 Docker Registry 多用户环境下的用户名,后者则往往是对应的软件名。但这并非绝对,取决于所使用的具体 Docker Registry 的软件或服务。
@ -22,7 +22,7 @@ Docker Registry 公开服务是开放给用户使用、允许用户管理镜像
### 私有 Docker Registry
除了使用公开服务外,用户还可以在本地搭建私有 Docker Registry。Docker 官方提供了 [Docker Registry](https://store.docker.com/images/registry/) 镜像,可以直接使用做为私有 Registry 服务。在 [私有仓库](../repository/registry.md) 一节中,会有进一步的搭建私有 Registry 服务的讲解。
除了使用公开服务外,用户还可以在本地搭建私有 Docker Registry。Docker 官方提供了 [Docker Registry](https://hub.docker.com/_/registry/) 镜像,可以直接使用做为私有 Registry 服务。在 [私有仓库](../repository/registry.md) 一节中,会有进一步的搭建私有 Registry 服务的讲解。
开源的 Docker Registry 镜像只提供了 [Docker Registry API](https://docs.docker.com/registry/spec/api/) 的服务端实现,足以支持 `docker` 命令,不影响使用。但不包含图形界面,以及镜像维护、用户管理、访问控制等高级功能。在官方的商业化版本 [Docker Trusted Registry](https://docs.docker.com/datacenter/dtr/2.0/) 中,提供了这些高级功能。

View File

@ -84,7 +84,7 @@ DATABASES = {
}
```
这些信息是在 [postgres](https://store.docker.com/images/postgres/) 镜像固定设置好的。然后,运行 `docker-compose up`
这些信息是在 [postgres](https://hub.docker.com/_/postgres/) 镜像固定设置好的。然后,运行 `docker-compose up`
```bash
$ docker-compose up

View File

@ -27,9 +27,9 @@ RUN echo '<h1>Hello, Docker!</h1>' > /usr/share/nginx/html/index.html
所谓定制镜像,那一定是以一个镜像为基础,在其上进行定制。就像我们之前运行了一个 `nginx` 镜像的容器,再进行修改一样,基础镜像是必须指定的。而 `FROM` 就是指定**基础镜像**,因此一个 `Dockerfile``FROM` 是必备的指令,并且必须是第一条指令。
在 [Docker Store](https://store.docker.com) 上有非常多的高质量的官方镜像,有可以直接拿来使用的服务类的镜像,如 [`nginx`](https://store.docker.com/images/nginx/)、[`redis`](https://store.docker.com/images/redis/)、[`mongo`](https://store.docker.com/images/mongo/)、[`mysql`](https://store.docker.com/images/mysql/)、[`httpd`](https://store.docker.com/images/httpd/)、[`php`](https://store.docker.com/images/php/)、[`tomcat`](https://store.docker.com/images/tomcat/) 等;也有一些方便开发、构建、运行各种语言应用的镜像,如 [`node`](https://store.docker.com/images/node)、[`openjdk`](https://store.docker.com/images/openjdk/)、[`python`](https://store.docker.com/images/python/)、[`ruby`](https://store.docker.com/images/ruby/)、[`golang`](https://store.docker.com/images/golang/) 等。可以在其中寻找一个最符合我们最终目标的镜像为基础镜像进行定制。
在 [Docker Hub](https://hub.docker.com/search?q=&type=image&image_filter=official) 上有非常多的高质量的官方镜像,有可以直接拿来使用的服务类的镜像,如 [`nginx`](https://hub.docker.com/_/nginx/)、[`redis`](https://hub.docker.com/_/redis/)、[`mongo`](https://hub.docker.com/_/mongo/)、[`mysql`](https://hub.docker.com/_/mysql/)、[`httpd`](https://hub.docker.com/_/httpd/)、[`php`](https://hub.docker.com/_/php/)、[`tomcat`](https://hub.docker.com/_/tomcat/) 等;也有一些方便开发、构建、运行各种语言应用的镜像,如 [`node`](https://hub.docker.com/_/node)、[`openjdk`](https://hub.docker.com/_/openjdk/)、[`python`](https://hub.docker.com/_/python/)、[`ruby`](https://hub.docker.com/_/ruby/)、[`golang`](https://hub.docker.com/_/golang/) 等。可以在其中寻找一个最符合我们最终目标的镜像为基础镜像进行定制。
如果没有找到对应服务的镜像,官方镜像中还提供了一些更为基础的操作系统镜像,如 [`ubuntu`](https://store.docker.com/images/ubuntu/)、[`debian`](https://store.docker.com/images/debian/)、[`centos`](https://store.docker.com/images/centos/)、[`fedora`](https://store.docker.com/images/fedora/)、[`alpine`](https://store.docker.com/images/alpine/) 等,这些操作系统的软件库为我们提供了更广阔的扩展空间。
如果没有找到对应服务的镜像,官方镜像中还提供了一些更为基础的操作系统镜像,如 [`ubuntu`](https://hub.docker.com/_/ubuntu/)、[`debian`](https://hub.docker.com/_/debian/)、[`centos`](https://hub.docker.com/_/centos/)、[`fedora`](https://hub.docker.com/_/fedora/)、[`alpine`](https://hub.docker.com/_/alpine/) 等,这些操作系统的软件库为我们提供了更广阔的扩展空间。
除了选择现有镜像为基础镜像外Docker 还存在一个特殊的镜像,名为 `scratch`。这个镜像是虚拟的概念,并不实际存在,它表示一个空白的镜像。

View File

@ -51,7 +51,7 @@ $ docker-machine --version
docker-machine version 0.13.0, build 9ba6da9
```
如果 `docker version`、`docker info` 都正常的话,可以尝试运行一个 [Nginx 服务器](https://store.docker.com/images/nginx/)
如果 `docker version`、`docker info` 都正常的话,可以尝试运行一个 [Nginx 服务器](https://hub.docker.com/_/nginx/)
```bash
$ docker run -d -p 80:80 --name webserver nginx

View File

@ -28,7 +28,7 @@
### 更轻松的维护和扩展
Docker 使用的分层存储以及镜像的技术使得应用重复部分的复用更为容易也使得应用的维护更新更加简单基于基础镜像进一步扩展镜像也变得非常简单。此外Docker 团队同各个开源项目团队一起维护了一大批高质量的 [官方镜像](https://store.docker.com/search?q=&source=verified&type=image),既可以直接在生产环境使用,又可以作为基础进一步定制,大大的降低了应用服务的镜像制作成本。
Docker 使用的分层存储以及镜像的技术使得应用重复部分的复用更为容易也使得应用的维护更新更加简单基于基础镜像进一步扩展镜像也变得非常简单。此外Docker 团队同各个开源项目团队一起维护了一大批高质量的 [官方镜像](https://hub.docker.com/search/?type=image&image_filter=official),既可以直接在生产环境使用,又可以作为基础进一步定制,大大的降低了应用服务的镜像制作成本。
### 对比传统虚拟机总结