1- FROM debian:bookworm
1+ ARG BASE_IMAGE="debian:stable"
2+
3+ # BUILD argument for extra repositories (besides debian/stable) to install dachs.
4+ # Options are:
5+ # - "gavo/beta" (gavo/release + gavo/beta)
6+ # - "backports" (debian/backports)
7+ # - "main" (debian/main)
8+ # * Default is "main"
9+ ARG INSTALL_REPO="main"
10+
11+ # PostgreSQL version to install
12+ # * Default is "15"
13+ ARG PG_VERSION="15"
14+
15+ FROM $BASE_IMAGE
216
317LABEL Description=DaCHS\ is\ a\ publishing\ infrastructure\ for\ the\ Virtual\ Observatory. \
4- Reference=http://arxiv.org/abs/1408.5733
18+ Reference=http://arxiv.org/abs/1408.5733
519
620# Everyday tools
721RUN DEBIAN_FRONTEND='noninteractive' \
822 && apt-get update \
923 && apt-get install -y \
10- curl \
11- git \
12- gnupg2 \
13- locales \
14- procps \
15- sudo \
16- vim \
17- wget \
24+ curl \
25+ git \
26+ gnupg2 \
27+ locales \
28+ procps \
29+ sudo \
30+ vim \
31+ wget \
1832 && apt-get clean
1933
20- # BUILD argument for extra repositories (besides debian/stable) to install dachs.
21- # Options are:
22- # - backports (debian/backports)
23- # - gavo/beta (gavo/release + gavo/beta)
24- # - main (debian/main)
25- # * If not defined, default is 'main'
26- ARG INSTALL_REPO="${INSTALL_REPO:-main}"
2734
2835ENV _APT_SOURCES="/etc/apt/sources.list.d/gavo.list"
2936COPY etc/apt_sources.list "$_APT_SOURCES"
@@ -46,17 +53,16 @@ RUN curl https://vo.ari.uni-heidelberg.de/debian/gavo-archive-keyring.asc \
4653
4754# If installing any version other than "main", backports is in there:
4855RUN [ "$INSTALL_REPO" != "main" ] \
49- && sed -i '/deb.*backports/s/^#//' $_APT_SOURCES \
50- || echo "NOT using debian/backports repo"
56+ && sed -i '/deb.*backports/s/^#//' $_APT_SOURCES \
57+ || echo "NOT using debian/backports repo"
5158
5259# If installing -- i.e, "beta" version -- uncomment gavo's release and beta repos
5360RUN [ "$INSTALL_REPO" = "gavo/beta" -o "$INSTALL_REPO" = "latest" -o "$INSTALL_REPO" = "gavo" ] \
54- && sed -i '/deb.*heidelberg/s/^#//' $_APT_SOURCES \
55- || echo "NOT using gavo beta/release repos"
61+ && sed -i '/deb.*heidelberg/s/^#//' $_APT_SOURCES \
62+ || echo "NOT using gavo beta/release repos"
5663
5764RUN echo "Using the following repositories:" && grep "deb" $_APT_SOURCES
5865
59- ARG PG_VERSION=15
6066ENV PG_VERSION=${PG_VERSION}
6167
6268RUN DEBIAN_FRONTEND='noninteractive' && \
@@ -73,8 +79,8 @@ RUN PGFILE=/etc/postgresql/${PG_VERSION}/main/pg_hba.conf && \
7379RUN PGDATA=/var/lib/postgresql/${PG_VERSION} \
7480 mkdir -p -m 777 /var/run/postgresql/${PG_VERSION}-main.pg_stat_tmp/ && \
7581 su - postgres -c "/usr/lib/postgresql/${PG_VERSION}/bin/postgres \
76- -c config_file=/etc/postgresql/${PG_VERSION}/main/postgresql.conf \
77- -c logging_collector=on" & \
82+ -c config_file=/etc/postgresql/${PG_VERSION}/main/postgresql.conf \
83+ -c logging_collector=on" & \
7884 sleep 5 && \
7985 su postgres -c "createuser -s dachsroot" && \
8086 su postgres -c "createuser -s root" && \
0 commit comments