Skip to content
Snippets Groups Projects
Dockerfile.postgres 1.43 KiB
##############################################################################
# Dockerfile to build postgres for LINDAT Dspace container
# Based on Postgres
##############################################################################

ARG POSTGRES_VERSION=9.6
FROM postgres:$POSTGRES_VERSION
ARG POSTGRES_VERSION

ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
      maintainer="Egon W. Stemle <egon.stemle@eurac.edu>"

ENV TERM linux
# APT(-GET) tweaks
# Set some sane defaults for apt inside docker
ENV DEBIAN_FRONTEND=noninteractive
COPY apt.local.conf /etc/apt/apt.conf.d/99local.conf
#
#
RUN apt-get update && \
    apt-get upgrade

# Install git
RUN apt-get update && apt-get install git

# copy int db script
RUN mkdir -p /docker-entrypoint-initdb.d
COPY commul-customization/init-dspace-dbs.sh /docker-entrypoint-initdb.d/
RUN chmod +x /docker-entrypoint-initdb.d/*

# copy over modified config file
#COPY commul-customization/postgresql.conf /tmp/
#COPY commul-customization/updateConfig.sh /docker-entrypoint-initdb.d/_updateConfig.sh

# copy script generating utilities db
RUN mkdir /tmp/sql/
COPY adapt_utilities_sql.sh /tmp/sql/
RUN /tmp/sql/adapt_utilities_sql.sh

ARG LABEL_VERSION
ARG LABEL_BUILD_DATE
LABEL org.label-schema.version=$LABEL_VERSION \
      org.label-schema.build-date=$LABEL_BUILD_DATE \
      org.label-schema.vcs-url=$LABEL_VCS_URL