You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following line assumes a database exists by the name of $IRODS_ICAT_DBUSER. If that database does not exist, an error will occur and the container will exit.
Good catch. I've never ran into this myself, probably because we always initialize the postgres container with POSTGRES_DB in our Docker Compose network?
# From irods_catalog/Dockerfile
FROM postgres:14
COPY init-user-db.sh /docker-entrypoint-initdb.d/init-user-db.sh
# From irods_catalog/init-user-db.sh
#!/bin/bash
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE DATABASE "ICAT";
CREATE USER irods WITH PASSWORD 'irods';
GRANT ALL PRIVILEGES ON DATABASE "ICAT" to irods;
EOSQL
Bug
This was seen on the dev branch.
The following line assumes a database exists by the name of
$IRODS_ICAT_DBUSER
. If that database does not exist, an error will occur and the container will exit.irods-docker/docker/docker-entrypoint.sh
Lines 51 to 52 in 507048e
The error output will look similar to the following:
To fix this, an existing database must be passed to
psql
.template1
seems like a decent option (see comments on this stackoverflow answer).This situation can be reproduced by pointing the image to a new postgres database.
The text was updated successfully, but these errors were encountered: