From ee428fc52859c316d2710d6341af733e48d4f1fc Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Mon, 15 Jan 2018 23:11:09 +0800 Subject: + fix --- _posts/2018/01/new-blog.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '_posts') 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网页,然后在构建的过程中将静态网页 之前stage构建出的产物。以我的博客这个项目为例。假如我是想通过image来部署,那么我最终的产物是静态html文件,那么我可能需要一个nginx的基础 镜像。nginx:alpine 这个基础镜像很小,不到10MB,在Dockerfile里面将html文件COPY进去之后,最终得到的image也只有10MB左右的大小。但是 之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是 -构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。 +构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。目前我 +在本地写完rst文本,然后git push之后,CircleCI会自动进行Dockerfile的构建,然后将编译生成的静态html推送到gh-pages分支。 .. code-block:: bash @@ -90,4 +91,4 @@ GitHub的一个repo,然后每篇文章的评论对应这个repo中的issue。 .. _Sphinx: http://www.sphinx-doc.org/en/stable/ .. _Isso: https://github.com/posativ/isso .. _Staticman: https://staticman.net -.. _just-comments: https://just-comments.com/ \ No newline at end of file +.. _just-comments: https://just-comments.com/ -- cgit v1.2.3