From c6f2dc2549ace006f52f265e315116bb9d060249 Mon Sep 17 00:00:00 2001
From: Carlos H Brandt <carloshenriquebrandt@gmail.com>
Date: Wed, 8 Apr 2020 23:42:12 +0200
Subject: [PATCH] Add build-time argument APT_REPO to switch release/beta gavo
 repos

---
 dockerfile/Dockerfile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dockerfile/Dockerfile b/dockerfile/Dockerfile
index 9a23eff..34a191a 100644
--- a/dockerfile/Dockerfile
+++ b/dockerfile/Dockerfile
@@ -7,6 +7,14 @@ LABEL Description=DaCHS\ is\ a\ publishing\ infrastructure\ for\ the\ Virtual\ O
 
 MAINTAINER "Carlos Brandt <carloshenriquebrandt at gmail>"
 
+# BUILD-time arguments; to use GAVO's "beta" repo, for instance,
+# `docker build --build-arg APT_REPO=beta .`
+ARG APT_REPO="release"
+
+# Same for PostgreSQL-q3c plugin (consequently, PSQL db altogether)
+ARG PG_VERSION=9.6
+ENV PG_VERSION=${PG_VERSION}
+
 RUN DEBIAN_FRONTEND='noninteractive'                    && \
     apt-get update                                      && \
     apt-get install -y sudo wget vim locales git gnupg  && \
@@ -15,9 +23,8 @@ RUN DEBIAN_FRONTEND='noninteractive'                    && \
 ENV LANG=C.UTF-8
 RUN echo LANG="$LANG" > /etc/default/locale
 
-ENV PG_VERSION=9.6
 
-RUN echo 'deb http://vo.ari.uni-heidelberg.de/debian release main'     \
+RUN echo "deb http://vo.ari.uni-heidelberg.de/debian ${APT_REPO} main" \
         > /etc/apt/sources.list.d/gavo.list                         && \
     wget -qO - http://docs.g-vo.org/archive-key.asc | apt-key add -
 
-- 
GitLab