I am using this docker compose yaml to run both jupyter and postgress
version: "3"
services:
jupyter:
image: jupyter/scipy-notebook
container_name: "my_jupyter"
ports:
- 8888:8888
volumes:
- ${PWD}:/home/jovyan/work
postgres:
image: postgres
container_name: "my_postgres"
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=mysecretpassword
volumes:
- pg_data:/var/lib/postgresql/data
volumes:
pg_data:
With this I can start the containers. However the first container (I don’t know about the second) has no internet access. I tried to pip install something in the jupyter notebook and it failed
I also did
docker exec -it my_jupyter /bin/bash
(base) jovyan@9ea976cbdc32:~$ curl -I https://www.google.com
curl: (6) Could not resolve host: www.google.com
How can I solve this? is there something I am doing wrong that does not permit access to the internet?