Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
feat(mkdocs): 使用MkDocs替代Sphinx实现文档生成
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed Dec 19, 2019
2 parents c4656c1 + cd9cb65 commit ce76fa7
Show file tree
Hide file tree
Showing 98 changed files with 159 additions and 382 deletions.
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

Empty file added docs/Travis-CI.md
Empty file.
Binary file removed docs/docker.xmind
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,13 @@ root@1b44046832b4:~#
## 自定义

1. 主机`IP 127.0.0.1`可以替换为`localhost`

```
$ ssh root@localhost -p 32769
```

$ ssh root@localhost -p 32769
2. 可以在启动容器时指定主机端口号

```
$ docker run -d -p 32212:22 --name test_sshd zjzstu/ubuntu:18.04-ssh
```
$ docker run -d -p 32212:22 --name test_sshd zjzstu/ubuntu:18.04-ssh

参数`-p`将容器端口`22`映射到主机端口`32212`

## 环境变量
Expand All @@ -107,19 +105,15 @@ root@1b44046832b4:~#

1.`Dockerfile`中输入环境变量到`shell`初始文件,比如`/etc/profile`

```
...
# 无效
ENV NOTVISIBLE "in users profile"
# 有效
RUN echo "export VISIBLE=now" >> /etc/profile
...
# 无效
ENV NOTVISIBLE "in users profile"
# 有效
RUN echo "export VISIBLE=now" >> /etc/profile

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
```
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

2. 启动容器时手动设置

```
$ docker run -e ENV=value ...
```
$ docker run -e ENV=value ...
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# [Ubuntu 16.04]docker启动设置
# Docker启动设置

参考:[Control Docker with systemd](https://docs.docker.com/config/daemon/systemd/)

Expand Down
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# [Ubuntu 16.04]可选设置
# 可选设置

参考:[Post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/)

Expand Down Expand Up @@ -28,16 +28,12 @@
* 在桌面`Linux`环境(如`X Windows`)中,完全注销会话,然后重新登录
*`Linux`上,还可以运行以下命令来激活对组的更改:

```
$ newgrp docker
````
$ newgrp docker

4. 使用`docker`命令验证:

```
# 此命令下载测试镜像并在容器中运行它。当容器运行时,它会打印一条消息并退出
$ docker run hello-world
```
# 此命令下载测试镜像并在容器中运行它。当容器运行时,它会打印一条消息并退出
$ docker run hello-world

如果在将用户添加到`Docker`组之前,最初使用`sudo`运行`Docker cli`命令可能会看到以下错误,这表明由于`sudo`命令的原因,`~/.docker/`目录是用不正确的权限创建的

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Ubuntu 16.04]安装
# 安装

参考:[Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

# [Ubuntu 16.04]Compose安装
# Compose安装

参考:[Install Docker Compose](https://docs.docker.com/compose/install/)

## 必要条件

需要先安装`Docker`,参考[[Ubuntu 16.04]安装](https://container-automation.readthedocs.io/zh_CN/latest/docker/basic/[Ubuntu%2016.04]%E5%AE%89%E8%A3%85.html)
需要先安装`Docker`,参考[Docker安装](../basic/安装.md)

## 安装

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,4 @@
## RUN vs. CMD

* `RUN`用于在镜像构建时运行,并提交运行结果
* `CMD`在构建时不执行任何操作,但指定镜像的预期命令

## 示例一

## 示例二

## 示例三

* `CMD`在构建时不执行任何操作,但指定镜像的预期命令
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ EXPOSE 80/udp
1. 使用标识符`-P, --publish-all`来发布`EXPOSE`指定的端口,`docker`会随机映射主机端口到容器的侦听端口
2. 使用标识符`-p, --publish`指定容器和主机的映射端口

```
-p host-port:container-port/<protocol>
# 比如映射主机端口号80到容器8080端口,侦听TCP协议
-p 80:8080/tcp
```
-p host-port:container-port/<protocol>
# 比如映射主机端口号80到容器8080端口,侦听TCP协议
-p 80:8080/tcp

## 示例

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
12 changes: 12 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# 介绍

学习和使用容器和自动化工具

* [Jenkins](./jenkins.md)
* [Travis CI](./Travis-CI.md)
* [Docker](./docker/basic/[译]docker概述.md)

相关链接

* [今天你docker了吗?](https://www.zhujian.tech/posts/5c6c610b.html)
29 changes: 29 additions & 0 deletions docs/jenkins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# Jenkins

参考:[Jenkins](https://jenkins.io/)

## 教程

* [Jenkins安装](https://www.zhujian.tech/posts/5d15ec84.html)
* [Jenkins 更换镜像源](https://www.zhujian.tech/posts/9ff7f63d.html)
* [[Jenkins]手动下载插件](https://www.zhujian.tech/posts/373e88b0.html)
* [[Jenkins]freestyle工程](https://www.zhujian.tech/posts/fddee3e1.html)
* [[Jenkins][ssh]coding连接](https://www.zhujian.tech/posts/6185d82f.html)
* [[Jenkins][github]webhook连接](https://www.zhujian.tech/posts/341b6b1e.html)
* [[Jenkins][Gitlab]webhook连接](https://www.zhujian.tech/posts/6ff96ec3.html)
* [[Jenkins][Freestyle]环境变量设置](https://www.zhujian.tech/posts/f2f14bee.html)
* [[Jenkins][GitLab][Hexo]新建Freestyle工程实现CI功能](https://www.zhujian.tech/posts/446d640.html)
* [[Jenkins][GitLab][Hexo]新建Pipeline工程实现CI功能](https://www.zhujian.tech/posts/f80ec296.html)
* [[Jenkins]Tomcat托管](https://www.zhujian.tech/posts/bc77c204.html)
* [[Jenkins][Nginx]反向代理](https://www.zhujian.tech/posts/7c823af7.html)
* [[Jenkins]手动设置私钥](https://zhujian.tech/posts/c343c930.html)
* [[Jenkins]Pipeline工程配置NodeJS环境](https://www.zhujian.tech/posts/d521b4ea.html)

## 常见问题

- [[Jenkins]反向代理出错](https://www.zhujian.tech/posts/adc5ce0c.html)
- [This Jenkins instance appears to be offline](https://www.zhujian.tech/posts/6af1c833.html)
- [[Jenkins]Url is blocked: Requests to localhost are not allowed](https://www.zhujian.tech/posts/5d46d7f9.html)
- [Hook executed successfully but returned HTTP 404](https://www.zhujian.tech/posts/6ff96ec3.html)
- [Hook executed successfully but returned HTTP 403](https://www.zhujian.tech/posts/6ff96ec3.html)
35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

71 changes: 0 additions & 71 deletions docs/source/conf.py

This file was deleted.

13 changes: 0 additions & 13 deletions docs/source/docker/advanced.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/source/docker/basic.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/source/docker/docker-compose.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs/source/docker/dockerfile.rst

This file was deleted.

16 changes: 0 additions & 16 deletions docs/source/docker/gui.rst

This file was deleted.

0 comments on commit ce76fa7

Please sign in to comment.