From 8dd11f1e032cf431408ce18a2952d50fcabe00f3 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Mon, 18 Oct 2021 21:57:43 +0200 Subject: [PATCH] Local development Docker improvements --- .dockerignore | 8 ++++++++ Dockerfile | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..7d3ce5c0c44 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +/.git +/_build/doctrees +/_build/spelling +/_build/html +/_build/logs.txt +/_build/vendor +/_build/output +*.pyc diff --git a/Dockerfile b/Dockerfile index c1e63debe91..3995b8ff70a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,20 @@ -FROM python:2-stretch as builder +FROM python:2-alpine as builder WORKDIR /www COPY ./_build/.requirements.txt _build/ -RUN pip install pip==9.0.1 wheel==0.29.0 \ +RUN apk add \ + git \ + make + +RUN pip install pip==9.0.1 wheel==0.29.0 \ && pip install -r _build/.requirements.txt COPY . /www RUN make -C _build html -FROM nginx:latest +FROM nginx:alpine COPY --from=builder /www/_build/html /usr/share/nginx/html