jacobalberty / firebird-docker

Firebird Dockerfile
130 stars 96 forks source link

Firebird 3.0 restore and FIREBIRD_ALIASES not working together #102

Closed gribok closed 1 year ago

gribok commented 1 year ago

Hi,

I am using the docker image jacobalberty/firebird:3.0 from the Docker Hub. I use the restore function of *.fdk database by using a shared directory to /firebird/restore. So far, it works well But when I define the ENV variable FIREBIRD_ALIASES for the restored databases it doesn't work anymore. I think, I've found the issue:

FIREBIRD_ALIASES is called before restoring of the databases start See https://github.com/jacobalberty/firebird-docker/blob/master/docker-entrypoint.sh#L204 https://github.com/jacobalberty/firebird-docker/blob/master/docker-entrypoint.sh#L212 https://github.com/jacobalberty/firebird-docker/blob/master/docker-entrypoint.sh#L83

"${PREFIX}"/bin/registerDatabase.sh contains a statement, that when a database doesn't exist then it will be created.

    if [ ! -f $newDB ]
      then
        /usr/local/firebird/bin//isql <<EOF
create database '$aliasName';
quit;
EOF
    fi

When the dummy database is created, the restore function is not working anymore.

A workaround would be to move "${PREFIX}"/bin/registerDatabase.sh below the restore function.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.