You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deploy.md
+46
Original file line number
Diff line number
Diff line change
@@ -135,3 +135,49 @@ frontend:
135
135
| /<*>.md | /<*>.md | 200 (Rewrite) |
136
136
| /<*>.png | /<*>.png | 200 (Rewrite) |
137
137
| /<*> | /index.html | 200 (Rewrite) |
138
+
139
+
140
+
## Docker
141
+
142
+
- Create docsify files
143
+
144
+
You need prepare the initial files instead of making in container.
145
+
See the [Quickstart](https://docsify.js.org/#/quickstart) section for instructions on how to create these files manually or using [docsify-cli](https://github.com/docsifyjs/docsify-cli).
146
+
147
+
```sh
148
+
index.html
149
+
README.md
150
+
```
151
+
152
+
- Create dockerfile
153
+
154
+
```Dockerfile
155
+
FROM node:latest
156
+
LABEL description="A demo Dockerfile for build Docsify."
157
+
WORKDIR /docs
158
+
RUN npm install -g docsify-cli@latest
159
+
EXPOSE 3000/tcp
160
+
ENTRYPOINT docsify serve .
161
+
162
+
```
163
+
164
+
So, current directory structure should be this:
165
+
166
+
```sh
167
+
index.html
168
+
README.md
169
+
Dockerfile
170
+
```
171
+
172
+
- Build docker image
173
+
174
+
```sh
175
+
docker build -f Dockerfile -t docsify/demo .
176
+
```
177
+
178
+
- Run docker image
179
+
180
+
```sh
181
+
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
0 commit comments