jacobalberty / firebird-docker

Firebird Dockerfile
130 stars 96 forks source link

Volume mapping throws infinite restarting loop #83

Closed Bence98007 closed 2 years ago

Bence98007 commented 2 years ago

Hi there!

As soon as I mount the /firebird/etc folder to the host, and start the compose, the container creates successfully, but it is in a restarting loop, and throws this error msg:

Statement failed, SQLSTATE = 08001
I/O error during "open" operation for file "security.db"
-Error while trying to open file
-No such file or directory
Use CONNECT or CREATE DATABASE to specify a database
Use CONNECT or CREATE DATABASE to specify a database
Use CONNECT or CREATE DATABASE to specify a database

Which is true, since when I mount the folder to the host, no config file will be placed in the /firebird/etc folder, that way the security.db database cannot be created. If its allowed to mount this config folder to host, then why it is not working, or if its not allowed then why there are config files? This is my docker-compose:


version: '3.3'
services:
    firebird-3:
        restart: unless-stopped
        container_name: fb3
        ports:
            - '3050:3050'
            - '30501:30501'
        volumes:
            - '/var/containersdata/firebird3/data/:/firebird/data/'
            - '/var/containersdata/firebird3/etc/:/firebird/etc/'
            - '/var/containersdata/firebird3/log/:/firebird/log/'
        environment:
            - TZ=Europe/Budapest
            - LANG=C.UTF-8
            - LC_ALL=C.UTF-8
            - ISC_PASSWORD=masterkey
        image: 'jacobalberty/firebird:3.0'
jacobalberty commented 2 years ago

My docker-compose just maps /firebird instead of each folder individually. in docker-entrypoint.sh the firebirdSetup function just checks for the existence of /firebird/etc and copies the default files in if that folder doesnt exist. So by mapping etc directly you cause /firebird/etc to already exist so it never tries to copy the files over.

your setup looks like you could just replace all 3 of those volumes lines with just one that looks like - '/var/containersdata/firebird3:/firebird as a workaround for now. Once it has started up successfully once you could then restore your original configuration if you have reasons for wanting them split.

The documentation does suggest them being split like that though so I should probably fix it to look for /firebird/etc/firebird.conf instead of just /firebird/etc to determine if its a new installation.

jacobalberty commented 2 years ago

Should be properly fixed in the 3.0 tag on docker hub if you want to test it out. 4.0 is building now

Bence98007 commented 2 years ago

I'll test it as soon as I have time! Thanks!! I'll keep u updated.

github-actions[bot] commented 2 years 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.