Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

262
Vistas
Can't connect to databases from devcontainer

I'm working on building an environment for an educational setting, but for some reason my dev container isn't able to connect to the databases that are being generated by the docker-compose.yml. See below:

# docker-compose.yml
version: '3.9'

services:
  conda:
    image: continuumio/anaconda3:latest
    build:
      context: ..
      dockerfile: .devcontainer/Dockerfile
    command: sleep infinity
    volumes:
      - ..:/workspace:cached

  mongo:
    image: mongo:latest
    restart: unless-stopped
    volumes:
      - dbs:/data/db

  postgres:
    image: postgres:latest
    restart: unless-stopped
    volumes:
      - dbs:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: postgres
  
volumes:
  dbs:

When I attempt to connect to the PostgreSQL database using SQLTools on port 5432 on localhost, I get the following:

[1642491269885] ERROR (ls): Connecting error: {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}},"name":"Error"}
    ns: "conn-manager"
[1642491269886] ERROR (ext): ERROR: Error opening connection connect ECONNREFUSED 127.0.0.1:5432, {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}}}
    ns: "error-handler"

As a possibly important aside, I am also noticing that the PostgreSQL instance is constantly restarting. Here is what the docker container set looks like:

enter image description here

However, I should note that I can't connect to the mongodb instance either, using the Mongo for VS Code extension.

Let me know how I can make this work!

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda