Coder Social home page Coder Social logo

Comments (4)

rathboma avatar rathboma commented on May 14, 2024

That's interesting. Yeah I'm using the default node-psql library without the libpq plug-in. I wonder if it does hostname resolution differently.

Can you show me how to set up that specific DNS setup?

from beekeeper-studio.

k3rni avatar k3rni commented on May 14, 2024

Sure! With one correction: there are two similar projects on Github, and I've linked to the wrong one, now corrected. This is all under Linux, other platforms may lack this feature.

However, supporting it should not require doing anything - that is, if you're using regular libc name lookup, and not something that uses DNS directly (skipping other mechanisms, which this is one of).

  1. Install libnss-docker (Debians), nss-docker-git (Arch), or just compile and install from source.

  2. If not done so already by package manager, ensure you have it inserted into /etc/nsswitch.conf as instructed on the project page. The exact position is not important, just that it's somewhere before dns. On my system, the relevant line looks like this:

    hosts: files mymachines docker mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns mdns4 myhostname
    
  3. Launch a postgres instance in docker

    docker run -it --rm --name bk-psql -e POSTGRES_PASSWORD=helloworld postgres:alpine
    
  4. From now on you can ping bk-psql.docker or connect to it with psql -h bk-psql.docker -U postgres, on the same machine - not across the network

from beekeeper-studio.

rathboma avatar rathboma commented on May 14, 2024

I think this is a limitation with the Snap version of Beekeeper. I bet if you tried the AppImage it would work. I've had lots of issues with the Snap version -- lots of security walls

from beekeeper-studio.

k3rni avatar k3rni commented on May 14, 2024

You are correct, it does work indeed in the AppImage version. I think we can close this, maybe with a couple lines in the docs about the snap version being more restricted.

from beekeeper-studio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.