aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2018-01-15 23:11:09 +0800
committerclarkzjw <[email protected]>2018-01-15 23:11:09 +0800
commitee428fc52859c316d2710d6341af733e48d4f1fc (patch)
treef84f6995833b773c587f7f6e1d1393a6454f3767
parentf05b2fb65378493ee2f02177583d0360c28ece1f (diff)
downloadblog.jinwei.me-ee428fc52859c316d2710d6341af733e48d4f1fc.tar.gz
+ fix
-rw-r--r--_posts/2018/01/new-blog.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/_posts/2018/01/new-blog.rst b/_posts/2018/01/new-blog.rst
index e7857e5..849e9a1 100644
--- a/_posts/2018/01/new-blog.rst
+++ b/_posts/2018/01/new-blog.rst
@@ -33,7 +33,8 @@ Dockerfile中生成静态html网页,然后在构建的过程中将静态网页
33之前stage构建出的产物。以我的博客这个项目为例。假如我是想通过image来部署,那么我最终的产物是静态html文件,那么我可能需要一个nginx的基础 33之前stage构建出的产物。以我的博客这个项目为例。假如我是想通过image来部署,那么我最终的产物是静态html文件,那么我可能需要一个nginx的基础
34镜像。nginx:alpine 这个基础镜像很小,不到10MB,在Dockerfile里面将html文件COPY进去之后,最终得到的image也只有10MB左右的大小。但是 34镜像。nginx:alpine 这个基础镜像很小,不到10MB,在Dockerfile里面将html文件COPY进去之后,最终得到的image也只有10MB左右的大小。但是
35之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是 35之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是
36构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。 36构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。目前我
37在本地写完rst文本,然后git push之后,CircleCI会自动进行Dockerfile的构建,然后将编译生成的静态html推送到gh-pages分支。
37 38
38.. code-block:: bash 39.. code-block:: bash
39 40
@@ -90,4 +91,4 @@ GitHub的一个repo,然后每篇文章的评论对应这个repo中的issue。�
90.. _Sphinx: http://www.sphinx-doc.org/en/stable/ 91.. _Sphinx: http://www.sphinx-doc.org/en/stable/
91.. _Isso: https://github.com/posativ/isso 92.. _Isso: https://github.com/posativ/isso
92.. _Staticman: https://staticman.net 93.. _Staticman: https://staticman.net
93.. _just-comments: https://just-comments.com/ \ No newline at end of file 94.. _just-comments: https://just-comments.com/
Powered by cgit v1.2.3 (git 2.41.0)