🔖 Docker 文档
parent
d55dffa43b
commit
4c3e42da8a
|
@ -14,7 +14,9 @@
|
|||
- [ ] 配置(configuration)
|
||||
- [ ] 进阶篇(advanced)
|
||||
- [x] [Docker 的设计](advanced/docker-design.md)
|
||||
- [ ] 实践篇(practice)
|
||||
- [x] 实践篇(practice)
|
||||
- [x] [Docker 安装 MySQL](practice/docker-install-mysql.md)
|
||||
- [x] [Docker 安装 Nginx](practice/docker-install-nginx.md)
|
||||
- [ ] 常见问题(faq)
|
||||
- [x] [附录](appendix/README.md)
|
||||
- [x] [Docker 命令](appendix/docker-cli.md)
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# Docker 安装 MySQL
|
||||
|
||||
> 实测环境:Centos
|
||||
|
||||
## 查看可下载镜像
|
||||
|
||||
```docker
|
||||
# docker search mysql
|
||||
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
|
||||
docker.io docker.io/mysql MySQL is a widely used, open-source relati... 5757 [OK]
|
||||
docker.io docker.io/mariadb MariaDB is a community-developed fork of M... 1863 [OK]
|
||||
docker.io docker.io/mysql/mysql-server Optimized MySQL Server Docker images. Crea... 397 [OK]
|
||||
...
|
||||
```
|
||||
|
||||
## 选择下载官方镜像
|
||||
|
||||
比如,我想下载最新版本,则执行如下命令:
|
||||
|
||||
```docker
|
||||
docker pull mysql
|
||||
```
|
||||
|
||||
## 使用镜像
|
||||
|
||||
```docker
|
||||
docker run -p 3306:3306 --name mysql -v /opt/docker_v/mysql/conf:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=123456 -d mysql
|
||||
```
|
||||
|
||||
## 资源
|
||||
|
||||
* https://hub.docker.com/_/mysql/
|
|
@ -0,0 +1,28 @@
|
|||
# Docker 安装 Nginx
|
||||
|
||||
> 实测环境:Centos
|
||||
|
||||
## 查看可用镜像
|
||||
|
||||
执行 `docker search nginx` 命令查看可用镜像:
|
||||
|
||||
```docker
|
||||
# docker search nginx
|
||||
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
|
||||
docker.io docker.io/nginx Official build of Nginx. 8272 [OK]
|
||||
docker.io docker.io/jwilder/nginx-proxy Automated Nginx reverse proxy for docker c... 1300 [OK]
|
||||
docker.io docker.io/richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable ... 540 [OK]
|
||||
docker.io docker.io/jrcs/letsencrypt-nginx-proxy-companion LetsEncrypt container to use with nginx as... 336 [OK]
|
||||
...
|
||||
```
|
||||
|
||||
## 选择下载镜像
|
||||
|
||||
执行 `docker pull nginx` 命令下载镜像
|
||||
|
||||
## 运行镜像
|
||||
|
||||
```
|
||||
docker run -p 80:80 --name mynginx -d nginx
|
||||
```
|
||||
|
Loading…
Reference in New Issue