Home > Blockchain >  How to connect into firebird's docker image, using a docker filepath?
How to connect into firebird's docker image, using a docker filepath?

Time:01-10

I have a firebird DB image running on port 3050, I need to access a file inside that image via url, so I can create a firebird connection (Yes firebird demands a filepath), but I can't find the file using the url Is there a way to expose a file inside the docker, and make it accessible via url? example localhost:3050/databases/test.fdb << I need to connect to this via dbeaver

its runnning normally on the 3050

heres the file I need to access via url (thats inside the container) (located on /databases)

How I'm trying to connect

CodePudding user response:

You need to use the absolute path /databases/DREAMCLUB.FDB, not the relative path databases/DREAMCLUB.FDB. See also the Jaybird FAQ on JDBC URLs (Jaybird is the Firebird JDBC driver used by DBeaver):

On Linux the root / should be included in the path. A database located on /opt/firebird/db.fdb should use (note the double slash after port!):

jdbc:firebirdsql://host:port//opt/firebird/db.fdb 

And a similar mention in the Jaybird JDBC Driver Java Programmer's Manual:

On Unix platforms the path must include the root, as the path is otherwise interpreted relative to a server-dependent folder. Having to include the root has the effect that a database in /var/firebird/employee.fdb needs to use a double // after the host name (and port) in the connection string: jdbc:firebirdsql://localhost//var/firebird/employee.fdb

As an aside, Firebird doesn't require you use a file path, you can also define an alias in aliases.conf (Firebird 2.5 and earlier) or databases.conf (Firebird 3.0 and higher).

  •  Tags:  
  • Related