I want to migrate from old Airflow that is installed locally to a new one. I am trying to run new Airflow trough Docker and Docker Compose. I am using official docker-compose.yml. The problem that I have is that I can't send email using python smtplib and I am confident that the problem is in network settings of my container. I have tried everything from swiss_knights's answer, but I could not make it work. When I run
docker compose up
I get infinite loop of
.
prints from services in which I put network_mode: "host"
.
I would prefere to use hots's network so my codebase migration can be seamless (localhost
part of my .py files won't need editing). How should I edit my .yml file?
Linux CentOS 7, Docker 24.0.5 and Docker Compose v2.20.2
I tried:
- adding
network_mode: "host"
in each service - adding
network_mode: bridge
extra_hosts:
- "host.docker.internal:host-gateway"
to each service
- created custom network as per swiss_knights's answer