Skip to content

Commit

Permalink
[wip] Update dachs-server image
Browse files Browse the repository at this point in the history
  • Loading branch information
chbrandt committed Aug 3, 2023
1 parent 17e0475 commit 9d703d5
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions dockerfiles/dachs/Dockerfile.dachs_server
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG DEBVER="bookworm"
FROM debian:$DEBVER
FROM debian:bookworm

LABEL Description=DaCHS\ is\ a\ publishing\ infrastructure\ for\ the\ Virtual\ Observatory. \
Reference=http://arxiv.org/abs/1408.5733
Expand All @@ -21,21 +20,14 @@ RUN DEBIAN_FRONTEND='noninteractive' \
# BUILD argument for extra repositories (besides debian/stable) to install dachs.
# Options are:
# - backports (debian/backports)
# - beta (gavo/release + gavo/beta)
# - release (debian/main)
# * If not defined, default is 'release'
ARG INSTALL_REPO="${INSTALL_REPO:-release}"

ENV REPO_RELEASE='deb http://vo.ari.uni-heidelberg.de/debian release main'
ENV REPO_BETA='deb http://vo.ari.uni-heidelberg.de/debian beta main'
ENV REPO_BACKPORT='deb http://deb.debian.org/debian ${DEBVER}-backports main contrib'
# - gavo/beta (gavo/release + gavo/beta)
# - main (debian/main)
# * If not defined, default is 'main'
ARG INSTALL_REPO="${INSTALL_REPO:-main}"

ENV _APT_SOURCES="/etc/apt/sources.list.d/gavo.list"
COPY etc/apt_sources.list "$_APT_SOURCES"

ARG PG_VERSION=13
ENV PG_VERSION=${PG_VERSION}

# Some fixes on the environment
# ---
# This is the brute-force solution for Debian;
Expand All @@ -52,11 +44,13 @@ RUN sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d
RUN curl https://vo.ari.uni-heidelberg.de/debian/gavo-archive-keyring.asc \
| tee /etc/apt/trusted.gpg.d/gavo-archive.keyring.asc

RUN [ "$INSTALL_REPO" != "main" -o "$INSTALL_REPO" != "release" ] \
# If installing any version other than "main", backports is in there:
RUN [ "$INSTALL_REPO" != "main" ] \
&& sed -i '/deb.*backports/s/^#//' $_APT_SOURCES \
|| echo "NOT using debian/backports repo"

RUN [ "$INSTALL_REPO" = "gavo" -o "$INSTALL_REPO" = "latest" -o "$INSTALL_REPO" = "beta" ] \
# If installing -- i.e, "beta" version -- uncomment gavo's release and beta repos
RUN [ "$INSTALL_REPO" = "gavo/beta" -o "$INSTALL_REPO" = "latest" -o "$INSTALL_REPO" = "gavo" ] \
&& sed -i '/deb.*heidelberg/s/^#//' $_APT_SOURCES \
|| echo "NOT using gavo beta/release repos"

Expand All @@ -68,6 +62,9 @@ ENV GAVO_INPUTS="${GAVO_ROOT}/inputs"
ENV GAVO_SETTINGS="/etc/gavo.rc"
ENV GAVOSETTINGS="$GAVO_SETTINGS"

ARG PG_VERSION=13
ENV PG_VERSION=${PG_VERSION}

# Install only the core of gavo and spatial extension to db
RUN DEBIAN_FRONTEND='noninteractive' && \
apt-get update && \
Expand Down

0 comments on commit 9d703d5

Please sign in to comment.