I'm trying to run / create a container in docker with PHP + Firebird, I found a container that runs Firebird , I found another one that runs PHP and Firebird, but when I try to consume the database:
$conn = ibase_connect('localhost:/database.fdb', 'user', 'masterkey');
I get the message:
Warning: ibase_connect(): Unable to complete network request to host "localhost". Failed to establish a connection
I am working on a project that currently runs Firebird and we need to migrate to PHP / MySQL and as it is a very large bank we need to constantly access to migrate the data. I've done some testing on Windows using IBExpert, the bank is working properly.
Has anyone ever had this problem, or have you tried using PHP + Firebird in Docker?
RESOLVED
The links
property was missing so the other container could connect to the bank. I'll leave docker-compose.yml
here if someone needs to connect to Firebird + PHP using Docker.
version: '2'
services:
db:
image: jacobalberty/firebird:2.5-ss
ports:
- 3050:3050
volumes:
- ./data:/databases
php:
image: almeida/php-firebird
ports:
- 80:80
volumes:
- ./www:/usr/share/nginx/html/
links:
- db
The password to access firebird inside the db container is inside the file /firebird/etc/SYSDBA.password