nsadehN

how can you make docker containers running on Windmill access the same networking as the rest of the

how can you make docker containers running on Windmill access the same networking as the rest of the Windmill services?

I added a redis instance to the docker compose file. I have a Python script running on Windmill that accesses this redis instance successfully

    conn = redis.Redis(host="redis", port=6379, db=0)
    return conn.set("0", "0")


I have a docker container running after I followed the documentation on how to setup docker. The script to run it is as follows:
docker run --rm \
-e REDIS_HOSTNAME=redis \
-e REDIS_PORT=6379 \
$IMAGE


I get the following error (container running JVM code):
Caused by: java.net.UnknownHostException: redis


This means that my code inside my container was not able to resolve that redis = my redis instance, but the python code was able to.
Was this page helpful?