[gimp-web/oscp] www: use ARGs in Dockerfile to keep changes to other Dockerfiles minimal



commit 201e0b0506a74e1430dc6b3d40814ea83b670de8
Author: Michael Schumacher <schumaml gmx de>
Date:   Mon Jul 5 19:40:45 2021 +0200

    www: use ARGs in Dockerfile to keep changes to other Dockerfiles minimal

 www.gimp.org/Dockerfile | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/www.gimp.org/Dockerfile b/www.gimp.org/Dockerfile
index c4812a38..5f0ffab8 100644
--- a/www.gimp.org/Dockerfile
+++ b/www.gimp.org/Dockerfile
@@ -1,13 +1,22 @@
+FROM centos:8
+RUN dnf install -y python3-pip git make
+
+ARG branch=master
+ARG target
+
+RUN git clone --depth 1 --branch $branch https://gitlab.gnome.org/Infrastructure/gimp-web && \
+    cd gimp-web && \
+    python3 -m venv py3-venv && \
+    source py3-venv/bin/activate && \
+    pip3 install -r py3-requirements.txt && \
+    make $target
+
 FROM centos/httpd-24-centos7
 USER root
 
 COPY app_data /opt/app-root/src
-
-RUN yum install -y python2-pip git
-RUN git clone https://gitlab.gnome.org/Infrastructure/gimp-web.git /tmp/gimp-web && \
-    cd /tmp/gimp-web && pip install -r py2-requirements.txt && \
-    pelican content -o /opt/app-root/src/html -s pelicanconf.py && \
-    chown -R 1000580000:1000580000 /opt/app-root/src
+COPY --from=0 /gimp-web/output /opt/app-root/src/html
+RUN  chown -R 1000580000:1000580000 /opt/app-root/src
 
 EXPOSE 8080
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]