vscode-postgres icon indicating copy to clipboard operation
vscode-postgres copied to clipboard

docker container support

Open coldbrew1420 opened this issue 6 years ago • 1 comments

I'm attempting to connect with my cluster which is hosted on a docker container and I get the following error.

no pg_hba.conf entry for host "xxx.xx.x.x", user "postgres", database "postgres", SSL off

Note: the pg_hba.conf file is within a data directory that is mounted in the container. On my machine, it is a non-standard directory which is mounted to /var/lib/postgresql/data within the container. I am using docker-hub's postgres image

coldbrew1420 avatar Dec 16 '19 16:12 coldbrew1420

I've been using this vs-code extension with a docker Postgres server, and it's working fine for me. Are you sure that have the appropriate ports open, and are connecting with the correct user/password?

CharlesHolbrow avatar May 04 '20 16:05 CharlesHolbrow

Hello there. I had the same issue today and I didn't have the ports open.

My docker compose file:

docker-compose.yml

version: "3.9"

services:
  db:
    image: postgres:15.2
    volumes:
      - ./data/db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=put_here_user
      - POSTGRES_PASSWORD=put_here_pass
    ports:
      - "5432:5432"  

arielbotti avatar Apr 07 '23 10:04 arielbotti

closing as not an issue with the extension

Borvik avatar Apr 12 '23 08:04 Borvik