Socket.gaierror: [Errno -2] Name does not resolve - Custom DOcker COntainer

  • Hardware: Rasberry Pi 4 aarch64

I build a custom docker container using the following docker file which install python with pachages supabase, boto3 and paho-mqtt.

FROM nodered/node-red

USER root

RUN apk add --update --no-cache python3 python3-dev  libffi-dev && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools

RUN pip install boto3 supabase paho-mqtt

USER node-red

I have verified that alll packages have been installed . But the python script returns this error while trying to execute.

Any idea to solve this?

the python script tries to connect to something that it cannot find/resolve. Assuming your screenshot is from within the container, can it reach the outside world ?

Looking that now, apparently it doesn't work on the pi also. :smiling_face_with_tear: This script works on my laptop with windows 10.

Thanks for the reply

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.