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

**URL:** <https://discourse.nodered.org/t/socket-gaierror-errno-2-name-does-not-resolve-custom-docker-container/75563>\
**Category:** General\
**Tags:** docker\
**Created:** [22 February 2023 05:04 UTC](https://discourse.nodered.org/t/socket-gaierror-errno-2-name-does-not-resolve-custom-docker-container/75563 "2023-02-22T05:04:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![u1903101](https://avatars.discourse-cdn.com/v4/letter/u/ee59a6/32.png) [@u1903101](https://discourse.nodered.org/u/u1903101)\
**Post date:** [22 February 2023 05:04 UTC](https://discourse.nodered.org/t/socket-gaierror-errno-2-name-does-not-resolve-custom-docker-container/75563/1 "2023-02-22T05:04:17Z")

</div>

- 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.

```auto
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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/99590f5141243ba86540b5777548a523ad934b33.jpeg)

Any idea to solve this?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 February 2023 07:20 UTC](https://discourse.nodered.org/t/socket-gaierror-errno-2-name-does-not-resolve-custom-docker-container/75563/2 "2023-02-22T07:20:30Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![u1903101](https://avatars.discourse-cdn.com/v4/letter/u/ee59a6/32.png) [@u1903101](https://discourse.nodered.org/u/u1903101)\
**Post date:** [22 February 2023 09:22 UTC](https://discourse.nodered.org/t/socket-gaierror-errno-2-name-does-not-resolve-custom-docker-container/75563/3 "2023-02-22T09:22:19Z")

</div>

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

 ![IMG-20230222-WA0013](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4f4fcfecc68a93ced46c8cf4fba8220d0da62208.jpeg)

Thanks for the reply

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 April 2023 09:22 UTC](https://discourse.nodered.org/t/socket-gaierror-errno-2-name-does-not-resolve-custom-docker-container/75563/4 "2023-04-23T09:22:23Z")

</div>

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