mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 12:21:17 +00:00
修正多個用詞
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
## [MongoDB](https://registry.hub.docker.com/_/mongo/)
|
||||
|
||||
### 基本信息
|
||||
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是開源的 NoSQL 數據庫實現。
|
||||
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是開源的 NoSQL 數據庫實做。
|
||||
該倉庫提供了 MongoDB 2.2 ~ 2.7 各個版本的鏡像。
|
||||
|
||||
### 使用方法
|
||||
@@ -14,7 +14,7 @@ $ sudo docker run --name some-mongo -d mongo
|
||||
```
|
||||
$ sudo docker run --name some-app --link some-mongo:mongo -d application-that-uses-mongo
|
||||
```
|
||||
或者通過 `mongo`
|
||||
或者透過 `mongo`
|
||||
```
|
||||
$ sudo docker run -it --link some-mongo:mongo --rm mongo sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"'
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## [MySQL](https://registry.hub.docker.com/_/mysql/)
|
||||
|
||||
### 基本信息
|
||||
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是開源的關系數據庫實現。
|
||||
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是開源的關系數據庫實做。
|
||||
該倉庫提供了 MySQL 各個版本的鏡像,包括 5.6 系列、5.7 系列等。
|
||||
|
||||
### 使用方法
|
||||
@@ -13,7 +13,7 @@ $ sudo docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d m
|
||||
```
|
||||
$ sudo docker run --name some-app --link some-mysql:mysql -d application-that-uses-mysql
|
||||
```
|
||||
或者通過 `mysql`。
|
||||
或者透過 `mysql`。
|
||||
```
|
||||
$ sudo docker run -it --link some-mysql:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## [Nginx](https://registry.hub.docker.com/_/nginx/)
|
||||
|
||||
### 基本信息
|
||||
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是開源的高效的 Web 服務器實現,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等協議。
|
||||
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是開源的高效的 Web 服務器實做,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等協議。
|
||||
該倉庫提供了 Nginx 1.0 ~ 1.7 各個版本的鏡像。
|
||||
|
||||
### 使用方法
|
||||
@@ -9,7 +9,7 @@
|
||||
```
|
||||
$ sudo docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d nginx
|
||||
```
|
||||
用戶也可以不使用這種映射方式,通過利用 Dockerfile 來直接將靜態頁面內容放到鏡像中,內容為
|
||||
使用者也可以不使用這種映射方式,透過利用 Dockerfile 來直接將靜態頁面內容放到鏡像中,內容為
|
||||
```
|
||||
FROM nginx
|
||||
COPY static-html-directory /usr/share/nginx/html
|
||||
@@ -24,7 +24,7 @@ $ sudo docker run --name some-nginx -d some-content-nginx
|
||||
sudo docker run --name some-nginx -d -p 8080:80 some-content-nginx
|
||||
```
|
||||
|
||||
Nginx的默認配置文件路徑為 `/etc/nginx/nginx.conf`,可以通過映射它來使用本地的配置文件,例如
|
||||
Nginx的默認配置文件路徑為 `/etc/nginx/nginx.conf`,可以透過映射它來使用本地的配置文件,例如
|
||||
```
|
||||
docker run --name some-nginx -v /some/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx
|
||||
```
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
該倉庫提供了 Node.js 0.8 ~ 0.11 各個版本的鏡像。
|
||||
|
||||
### 使用方法
|
||||
在項目中創建一個 Dockerfile。
|
||||
在項目中建立一個 Dockerfile。
|
||||
```
|
||||
FROM node:0.10-onbuild
|
||||
# replace this with your application's default port
|
||||
EXPOSE 8888
|
||||
```
|
||||
然後創建鏡像,並啟動容器
|
||||
然後建立鏡像,並啟動容器
|
||||
```
|
||||
$ sudo docker build -t my-nodejs-app
|
||||
$ sudo docker run -it --rm --name my-running-app my-nodejs-app
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## [Redis](https://registry.hub.docker.com/_/redis/)
|
||||
|
||||
### 基本信息
|
||||
[Redis](https://en.wikipedia.org/wiki/Redis) 是開源的內存 Key-Value 數據庫實現。
|
||||
[Redis](https://en.wikipedia.org/wiki/Redis) 是開源的內存 Key-Value 數據庫實做。
|
||||
該倉庫提供了 Redis 2.6 ~ 2.8.9 各個版本的鏡像。
|
||||
|
||||
### 使用方法
|
||||
@@ -19,7 +19,7 @@ $ sudo docker run --name some-redis -d redis redis-server --appendonly yes
|
||||
```
|
||||
$ sudo docker run --name some-app --link some-redis:redis -d application-that-uses-redis
|
||||
```
|
||||
或者通過 `redis-cli`
|
||||
或者透過 `redis-cli`
|
||||
```
|
||||
$ sudo docker run -it --link some-redis:redis --rm redis sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user