jacobalberty / firebird-docker

Firebird Dockerfile
130 stars 96 forks source link

Q: How to actually launch the database as daemon? #24

Closed zokker13 closed 5 years ago

zokker13 commented 6 years ago

Hey there,

sorry to waste the issuelist like this but I'm kind of stuck; How do I start the database actually? I'm able to launch the database in interactive mode and work my way through isql and be done with it. But at some point I'd love to run it as actual database.

I'm using the latest Dockerfile and I issue: docker run -v /home/phil/Documents/studium/db/docker_mount/:/firebird jacobalberty/firebird This allows me to mount the pre-existing database into the container.

But then I can not connect to the container. Checking the network reveals nothing:

└[$] ss -atn | grep 3050
┌[1|phil:~/Documents/studium]
└[$] 

Tailing on firebird.log reveals:

880db2c33908    Sat Mar 24 08:23:07 2018
    setsockopt: error setting IPV6_V6ONLY to 0

So I'm not sure how to continue from here on. Any help is appreciated!

jacobalberty commented 6 years ago

Sorry for the slow response, this is more of a docker issue you'll need to look into port forwarding for docker. The eaisest method is to use the --net=host parameter. This removes the network namespacing so it has a few caveats (traffic accounting doesn't work for one, for another it kills some of the isolation aspects). https://docs.docker.com/v17.09/engine/userguide/networking/default_network/binding/ has a writeup on using -p to expose just the ports you use but you'll need to make sure you expose the event port if you use events. My preferred method is either internal networking where you configure any services you want accessing firebird to use the same dockernetwork as firebird, or alternatively use macvlan https://docs.docker.com/network/macvlan/ macvlan makes a docker network that is bridged to the real interface. Macvlan has one caveat in that you can't access macvlan addresses from the docker host. To overcome that you'll need to subinterface. I think their 802.1q trunked example implements that? I don't see the guide I used on that page anymore.

TLDR:

  1. --net=host will instantly get it but kills network isolation
  2. -p 3050:3050 will get everything but events working
  3. docker networking will let other docker containers access the service privately
  4. macvlan will get it accessible by other hosts on the network as if its directly plugged in but not the docker host
  5. macvlan + subinterface (802.1q trunk bridge i think) will give you everything but requires the most setup.
iambudi commented 5 years ago

I can't make this work. How to properly run? docker run -v ~/Database/Firebird/:/firebird -p3050:3050 jacobalberty/firebird

setting 'SYSDBA' password to 'ec822ae112954a310a8c'
Statement failed, SQLSTATE = HY000
Missing requested management plugin
mrotteveel commented 5 years ago

@iambudi That seems like an issue unrelated to this question (it is a bug that is probably introduced by c38224a). I created #38 that should fix this.

zokker13 commented 5 years ago

Hello. Thanks for answering it. I ended up using a native version of firebird but it obviously correct that docker needs port forwarding. At the time of the issue creation I wasn't quite informed about docker so that was that.

Thanks for helping out, I appreciate it!

iROCKiD commented 1 year ago

Hello @zokker13 same error here. please send me ideal how to recpnfigure the firebird3.0

thank you! best regard noke-