FROM registry.uniworx.de/fradrive/fradrive/postgres:12 # Allow for connecting to database without password authentication ENV POSTGRES_HOST_AUTH_METHOD=trust RUN cp /mnt/fradrive/docker/database/schema.sql /schema.sql && chown postgres:postgres /schema.sql RUN cp /mnt/fradrive/docker/database/initdb.sh /etc/fradrive-db && chmod 755 /etc/fradrive-db USER postgres # postgresql.conf and postgres_hba.conf resulted in error (Invalid data directory or sth); using -o/--options in initdb.sh instead # COPY --chown=postgres:postgres --chmod=644 ./postgresql.conf /etc/postgresql/12/main/postgresql.conf # COPY --chown=postgres:postgres --chmod=644 ./pg_hba.conf /etc/postgresql/12/main/pg_hba.conf # ADD ./schema.sql /schema.sql # ADD --chmod=755 ./initdb.sh /etc/fradrive-db ENTRYPOINT /etc/fradrive-db EXPOSE 5432/tcp