aboutsummaryrefslogtreecommitdiff
path: root/_posts
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2018-01-15 15:14:34 +0000
committerclarkzjw <[email protected]>2018-01-15 15:14:34 +0000
commitb66a207fa134e54ee83e7c5ad68e45132abfed6a (patch)
tree593819aa96d33b8f58439e7876907c911c7c4695 /_posts
parentb19c2e8c958db132fd2ffd5c8ab87cf65f421856 (diff)
downloadblog.jinwei.me-b66a207fa134e54ee83e7c5ad68e45132abfed6a.tar.gz
Mon Jan 15 15:14:34 UTC 2018
Diffstat (limited to '_posts')
-rw-r--r--_posts/2018/01/new-blog.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/_posts/2018/01/new-blog.html b/_posts/2018/01/new-blog.html
index d90a82d..221ec5b 100644
--- a/_posts/2018/01/new-blog.html
+++ b/_posts/2018/01/new-blog.html
@@ -73,7 +73,8 @@ Dockerfile中生成静态html网页,然后在构建的过程中将静态网页
73之前stage构建出的产物。以我的博客这个项目为例。假如我是想通过image来部署,那么我最终的产物是静态html文件,那么我可能需要一个nginx的基础 73之前stage构建出的产物。以我的博客这个项目为例。假如我是想通过image来部署,那么我最终的产物是静态html文件,那么我可能需要一个nginx的基础
74镜像。nginx:alpine 这个基础镜像很小,不到10MB,在Dockerfile里面将html文件COPY进去之后,最终得到的image也只有10MB左右的大小。但是 74镜像。nginx:alpine 这个基础镜像很小,不到10MB,在Dockerfile里面将html文件COPY进去之后,最终得到的image也只有10MB左右的大小。但是
75之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是 75之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是
76构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。</p> 76构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。目前我
77在本地写完rst文本,然后git push之后,CircleCI会自动进行Dockerfile的构建,然后将编译生成的静态html推送到gh-pages分支。</p>
77<div class="highlight-bash"><div class="highlight"><pre><span></span>FROM python:3.6.0 as builder 78<div class="highlight-bash"><div class="highlight"><pre><span></span>FROM python:3.6.0 as builder
78LABEL <span class="nv">maintainer</span><span class="o">=</span>clarkzjw&lt;[email protected]&gt; 79LABEL <span class="nv">maintainer</span><span class="o">=</span>clarkzjw&lt;[email protected]&gt;
79RUN pip install virtualenv 80RUN pip install virtualenv
Powered by cgit v1.2.3 (git 2.41.0)