Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-compose - dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host #743

Closed
vmesel opened this issue Nov 24, 2022 · 0 comments

Comments

@vmesel
Copy link
Member

vmesel commented Nov 24, 2022

This is not a pREST problem, but a networking problem when using SSH Tunnelling to access a database. I'm adding this issue so users can handle it if it happens to occur to them.

Docker-compose.yml

version: "3"
services:
  prest:
    image: prest/prest:latest
    env_file:
      - .env
    volumes:
      - "./queries/:/app/queries/"
      - "./prest_conf/prest.toml:/app/prest.toml"
    ports:
      - 8081:8081

Container log:

test_prest-prest-1  | [prestd] Waiting for port host.docker.internal:5433 to become available...
test_prest-prest-1  | [prestd] Plugin/build: starting...
test_prest-prest-1  | [prestd] Go build simple plugins in only file!
test_prest-prest-1  | go build: hello plugin...
test_prest-prest-1  | [prestd] Go build complex plugins in folder (with main.go file)!
test_prest-prest-1  | [prestd] Plugin/build: ending
test_prest-prest-1  | [prestd] Ready hosting host.docker.internal to port 5433 !
test_prest-prest-1  | 2022/11/23 17:03:29 [warning] adapter is not set. Using the default (postgres)
test_prest-prest-1  | 2022/11/23 17:03:29 [error] dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host

This error is caused by docker's networking settings on your computer, to solve this add this single line to your service specification on docker-compose.yml

network_mode: host
@vmesel vmesel closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant