From 501597096d9fdbe0f7fc3cd63eee009068cdd245 Mon Sep 17 00:00:00 2001 From: koooooo-7 <369491420@qq.com> Date: Mon, 22 Jun 2020 23:28:19 +0800 Subject: [PATCH 1/4] [documentation deploy] deploy docsify in docker. --- docs/deploy.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/deploy.md b/docs/deploy.md index d68b5c9dc..41e053707 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -135,3 +135,54 @@ frontend: | /<*>.md | /<*>.md | 200 (Rewrite) | | /<*>.png | /<*>.png | 200 (Rewrite) | | /<*> | /index.html | 200 (Rewrite) | + + +## Docker + +>There is a simple demo for building docsify in docker. + +?> tips: you can get all the files for this demo from [here](https://github.com/Koooooo-7/docsify-docker). + +- Preparing Docsify initial files + You need prepare the initial files (generated by run `docsify init ./docs`) instead of making in container. + + ```sh + .nojekyll + index.html + README.md + ``` + +- Dockerfile + + ```Dockerfile + FROM node:latest + MAINTAINER Koooooo-7(https://github.com/Koooooo-7) + LABEL description="A demo Dockerfile for build Docsify." + WORKDIR /docs + RUN npm install -g docsify-cli@latest + EXPOSE 3000/tcp + ENTRYPOINT docsify serve . + + ``` + + So, current directory structure should be this: + + ```sh + .nojekyll + index.html + README.md + Dockerfile + ``` + +- Build Image + + ```sh + docker build -f Dockerfile -t docsify/demo . + ``` + +- Run + + ```sh + docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo + ``` + From 2d4fca4bddf45d96152567726b50793dcba42a6e Mon Sep 17 00:00:00 2001 From: koooooo-7 <369491420@qq.com> Date: Tue, 23 Jun 2020 00:20:09 +0800 Subject: [PATCH 2/4] [remove] remove unnecessary content. --- docs/deploy.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 41e053707..dbbc255a6 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -147,7 +147,6 @@ frontend: You need prepare the initial files (generated by run `docsify init ./docs`) instead of making in container. ```sh - .nojekyll index.html README.md ``` @@ -156,7 +155,6 @@ frontend: ```Dockerfile FROM node:latest - MAINTAINER Koooooo-7(https://github.com/Koooooo-7) LABEL description="A demo Dockerfile for build Docsify." WORKDIR /docs RUN npm install -g docsify-cli@latest @@ -168,7 +166,6 @@ frontend: So, current directory structure should be this: ```sh - .nojekyll index.html README.md Dockerfile From 32d768d6f03b78edab6e18da0e2b3ef477babde9 Mon Sep 17 00:00:00 2001 From: koooooo-7 <369491420@qq.com> Date: Tue, 23 Jun 2020 00:28:27 +0800 Subject: [PATCH 3/4] [change] remove outbox resource link. --- docs/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deploy.md b/docs/deploy.md index dbbc255a6..58c588c15 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -141,7 +141,7 @@ frontend: >There is a simple demo for building docsify in docker. -?> tips: you can get all the files for this demo from [here](https://github.com/Koooooo-7/docsify-docker). +?> tips: you can create all the files for this demo from [Quickstart](https://docsify.js.org/#/quickstart?id=initialize). - Preparing Docsify initial files You need prepare the initial files (generated by run `docsify init ./docs`) instead of making in container. From bcd06d5596f639b606870e4facfb9573e921d55b Mon Sep 17 00:00:00 2001 From: koooooo-7 <369491420@qq.com> Date: Tue, 23 Jun 2020 09:10:40 +0800 Subject: [PATCH 4/4] [refine] refine description. --- docs/deploy.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 58c588c15..2c96060f9 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -139,19 +139,17 @@ frontend: ## Docker ->There is a simple demo for building docsify in docker. +- Create docsify files -?> tips: you can create all the files for this demo from [Quickstart](https://docsify.js.org/#/quickstart?id=initialize). + You need prepare the initial files instead of making in container. + 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). -- Preparing Docsify initial files - You need prepare the initial files (generated by run `docsify init ./docs`) instead of making in container. + ```sh + index.html + README.md + ``` - ```sh - index.html - README.md - ``` - -- Dockerfile +- Create dockerfile ```Dockerfile FROM node:latest @@ -171,13 +169,13 @@ frontend: Dockerfile ``` -- Build Image +- Build docker image ```sh docker build -f Dockerfile -t docsify/demo . ``` -- Run +- Run docker image ```sh docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo