-
Notifications
You must be signed in to change notification settings - Fork 14
/
docsifyDocker.md
56 lines (50 loc) · 1.21 KB
/
docsifyDocker.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Docsify Docker
A magical documentation site generator.
## Examples
[awesome-docsify](https://github.com/docsifyjs/awesome-docsify)
## Quick start
`vi index.html`
```html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
//...
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
</body>
</html>
```
## Dockerfile
```
FROM node:latest
LABEL description="A demo Dockerfile for build Docsify."
WORKDIR /docs
RUN npm install -g docsify-cli@latest
EXPOSE 3000/tcp
ENTRYPOINT docsify serve .
```
## Docker
The current directory structure should be this:
```
index.html
README.md
Dockerfile
```
```sh
docker build -f Dockerfile -t docsify/demo .
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
```
[http://localhost:3000/](http://localhost:3000/)
## References
- [Docsify](https://docsify.js.org/#/zh-cn/deploy?id=docker)
- [Docsify GitHub](https://github.com/docsifyjs/docsify)