diff options
author | clarkzjw <[email protected]> | 2018-01-10 20:45:07 +0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2018-01-10 20:45:07 +0800 |
commit | c008c037facaf632dc9923bb2ecd4c9542c14c9d (patch) | |
tree | 05a612cc3a67f49e3d14138b2f0e062f153295e2 /Dockerfile | |
parent | f26f6cd71cb436216ce6993ae640e89bbb26226a (diff) | |
download | blog.jinwei.me-c008c037facaf632dc9923bb2ecd4c9542c14c9d.tar.gz |
+ add Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -1,6 +1,22 @@ | |||
1 | FROM python:3.6.0 | 1 | FROM python:3.6.0 as builder |
2 | 2 | ||
3 | LABEL maintainer=clarkzjw<[email protected]> | ||
3 | 4 | ||
5 | RUN pip install virtualenv | ||
4 | 6 | ||
5 | FROM nginx | 7 | COPY requirements.txt /app/requirements.txt |
6 | 8 | ||
9 | COPY bootstrap.py /app/bootstrap.py | ||
10 | |||
11 | RUN /app/bootstrap.py | ||
12 | |||
13 | ADD . /app | ||
14 | |||
15 | WORKDIR /app | ||
16 | |||
17 | RUN /bin/bash -c "source /app/.venv/bin/activate && make html" | ||
18 | |||
19 | |||
20 | FROM nginx:alpine | ||
21 | |||
22 | COPY --from=builder /app/_build/html /usr/share/nginx/html | ||