Use a better structure

This commit is contained in:
Baohua Yang
2026-02-09 09:32:05 -08:00
parent fdb879dcf2
commit e669ee0fe8
167 changed files with 2462 additions and 2462 deletions

View File

@@ -1,3 +1,3 @@
# 热门镜像介绍
## 热门镜像介绍
本章将介绍一些热门镜像的功能使用方法等包括 UbuntuCentOSMySQLMongoDBRedisNginxWordpressNode.js

View File

@@ -1,6 +1,6 @@
# [CentOS](https://hub.docker.com/_/centos)
## [CentOS](https://hub.docker.com/_/centos)
## 基本信息
### 基本信息
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
@@ -13,7 +13,7 @@
该仓库位于 `https://hub.docker.com/_/centos`提供了 CentOS 5 ~ 8 各个版本的镜像仅作为历史归档不再更新
## 使用方法
### 使用方法
使用 Rocky Linux 9 替代**推荐**
@@ -27,6 +27,6 @@ $ docker run --name rocky -it rockylinux:9 bash
$ docker run --name centos -it centos:7 bash
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/centos 查看。

View File

@@ -1,4 +1,4 @@
# minio
## minio
**MinIO** 是一个基于 Apache License v2.0 开源协议的对象存储服务它兼容亚马逊 S3 云存储服务接口非常适合于存储大容量非结构化的数据例如图片视频日志文件备份数据和容器/虚拟机镜像等而一个对象文件可以是任意大小从几 kb 到最大 5T 不等
@@ -6,7 +6,7 @@ MinIO 是一个非常轻量的服务,可以很简单的和其他应用的结合
[官方文档](https://docs.min.io/)
## 简单使用
### 简单使用
测试开发环境下不考虑数据存储的情况下可以使用下面的命令快速开启服务
@@ -14,11 +14,11 @@ MinIO 是一个非常轻量的服务,可以很简单的和其他应用的结合
$ docker run -d -p 9000:9000 -p 9090:9090 minio/minio server /data --console-address ':9090'
```
## 离线部署
### 离线部署
许多生产环境是一般是没有公网资源的这就需要从有公网资源的服务器上把镜像导出然后导入到需要运行镜像的内网服务器
### 导出镜像
#### 导出镜像
在有公网资源的服务器上下载好`minio/minio`镜像
@@ -28,7 +28,7 @@ $ docker save -o minio.tar minio/minio:latest
> 使用docker save 的时候也可以使用image id 来导出但是那样导出的时候就会丢失原来的镜像名称推荐还是使用镜像名字+tag来导出镜像
### 导入镜像
#### 导入镜像
把压缩文件复制到内网服务器上使用下面的命令导入镜像
@@ -36,7 +36,7 @@ $ docker save -o minio.tar minio/minio:latest
$ docker load minio.tar
```
### 运行 minio
#### 运行 minio
- `/mnt/data` 改成要替换的数据目录
- 替换 `MINIO_ROOT_USER` 的值
@@ -53,6 +53,6 @@ $ sudo docker run -d -p 9000:9000 -p 9090:9090 --name minio1 \
minio/minio server /data --console-address ':9090'
```
### 访问 web 管理页面
#### 访问 web 管理页面
http://x.x.x.x:9090

View File

@@ -1,12 +1,12 @@
# [MongoDB](https://hub.docker.com/_/mongo/)
## [MongoDB](https://hub.docker.com/_/mongo/)
## 基本信息
### 基本信息
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是开源的 NoSQL 数据库实现。
该仓库位于 `https://hub.docker.com/_/mongo/` 提供了 MongoDB 2.x ~ 4.x 各个版本的镜像
## 使用方法
### 使用方法
默认会在 `27017` 端口启动数据库
@@ -39,6 +39,6 @@ $ docker run -it --rm \
```
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/mongo 查看。

View File

@@ -1,12 +1,12 @@
# [MySQL](https://hub.docker.com/_/mysql/)
## [MySQL](https://hub.docker.com/_/mysql/)
## 基本信息
### 基本信息
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。
该仓库位于 `https://hub.docker.com/_/mysql/` 提供了 MySQL 5.5 ~ 8.x 各个版本的镜像
## 使用方法
### 使用方法
默认会在 `3306` 端口启动数据库
@@ -41,6 +41,6 @@ $ docker run -it --rm \
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/mysql 查看

View File

@@ -1,12 +1,12 @@
# [Nginx](https://hub.docker.com/_/nginx/)
## [Nginx](https://hub.docker.com/_/nginx/)
## 基本信息
### 基本信息
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。
该仓库位于 `https://hub.docker.com/_/nginx/` 提供了 Nginx 1.0 ~ 1.19.x 各个版本的镜像
## 使用方法
### 使用方法
下面的命令将作为一个静态页面服务器启动
@@ -44,6 +44,6 @@ $ docker run -d \
nginx
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/nginx 查看。

View File

@@ -1,18 +1,18 @@
# [Node.js](https://hub.docker.com/_/node/)
## [Node.js](https://hub.docker.com/_/node/)
## 基本信息
### 基本信息
[Node.js](https://en.wikipedia.org/wiki/Node.js) 是基于 JavaScript 的可扩展服务端和网络软件开发平台。
该仓库位于 `https://hub.docker.com/_/node/` 提供了 Node.js 0.10 ~ 14.x 各个版本的镜像
## 使用方法
### 使用方法
在项目中创建一个 Dockerfile
```docker
FROM node:12
# replace this with your application's default port
## replace this with your application's default port
EXPOSE 8888
```
@@ -35,6 +35,6 @@ $ docker run -it --rm \
node your-daemon-or-script.js
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/node 查看。

View File

@@ -1,12 +1,12 @@
# [PHP](https://hub.docker.com/_/php/)
## [PHP](https://hub.docker.com/_/php/)
## 基本信息
### 基本信息
[PHP](https://en.wikipedia.org/wiki/Php)Hypertext Preprocessor 超文本预处理器的字母缩写)是一种被广泛应用的开放源代码的多用途脚本语言,它可嵌入到 HTML 中,尤其适合 web 开发。
该仓库位于 `https://hub.docker.com/_/php/` 提供了 PHP 5.x ~ 8.x 各个版本的镜像
## 使用方法
### 使用方法
下面的命令将运行一个已有的 PHP 脚本
@@ -14,6 +14,6 @@
$ docker run -it --rm -v "$PWD":/app -w /app php:alpine php your-script.php
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/php 查看。

View File

@@ -1,12 +1,12 @@
# [Redis](https://hub.docker.com/_/redis/)
## [Redis](https://hub.docker.com/_/redis/)
## 基本信息
### 基本信息
[Redis](https://en.wikipedia.org/wiki/Redis) 是开源的内存 Key-Value 数据库实现。
该仓库位于 `https://hub.docker.com/_/redis/` 提供了 Redis 3.x ~ 6.x 各个版本的镜像
## 使用方法
### 使用方法
默认会在 `6379` 端口启动数据库
@@ -46,6 +46,6 @@ $ docker run -it --rm \
sh -c 'exec redis-cli -h some-redis'
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/redis 查看。

View File

@@ -1,12 +1,12 @@
# [Ubuntu](https://hub.docker.com/_/ubuntu/)
## [Ubuntu](https://hub.docker.com/_/ubuntu/)
## 基本信息
### 基本信息
[Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。
该仓库位于 `https://hub.docker.com/_/ubuntu/` 提供了 Ubuntu 12.04 ~ 20.04 各个版本的镜像
## 使用方法
### 使用方法
默认会启动一个最小化的 Ubuntu 环境
@@ -15,6 +15,6 @@ $ docker run --name some-ubuntu -it ubuntu:20.04
root@523c70904d54:/#
```
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/ubuntu 查看。

View File

@@ -1,12 +1,12 @@
# [WordPress](https://hub.docker.com/_/wordpress/)
## [WordPress](https://hub.docker.com/_/wordpress/)
## 基本信息
### 基本信息
[WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PHP 和 MySQL。
该仓库位于 `https://hub.docker.com/_/wordpress/` 提供了 WordPress 4.x ~ 5.x 版本的镜像
## 使用方法
### 使用方法
启动容器需要 MySQL 的支持默认端口为 `80`
@@ -33,6 +33,6 @@ $ docker run --name some-wordpress -d --network my-wordpress-net -e WORDPRESS_DB
* `WORDPRESS_DB_NAME`: WordPress 要使用的数据库名
## Dockerfile
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/wordpress 查看。