# Node-RED in a docker container doesn't seem to be able to execute some programs with the exec node

**URL:** https://discourse.nodered.org/t/node-red-in-a-docker-container-doesnt-seem-to-be-able-to-execute-some-programs-with-the-exec-node/78826
**Category:** General
**Tags:** docker, exec
**Created:** [30 May 2023 18:15 UTC](https://discourse.nodered.org/t/node-red-in-a-docker-container-doesnt-seem-to-be-able-to-execute-some-programs-with-the-exec-node/78826 "2023-05-30T18:15:51Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jodelkoenig](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jodelkoenig/32/44645_2.png) [@jodelkoenig](https://discourse.nodered.org/u/jodelkoenig)
#### Post date: [30 May 2023 19:19 UTC](https://discourse.nodered.org/t/node-red-in-a-docker-container-doesnt-seem-to-be-able-to-execute-some-programs-with-the-exec-node/78826/3 "2023-05-30T19:19:59Z")

</div>

your docker-node-red is indeed running independently from the OS, hence it cannot execute anything that is outside of this container's reach. While you can copy binaries to a persistent folder which docker-node-red has access to, this does not guarantee all dependencies are covered to run the OS binary in your docker-node-red-OS - now or after any update of either OS or container.

There is, however, a solution:

 ![exec with ssh](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/8/e870b6006a1cd8d369f8fa763e27a94895192d21.png)

1. pi is the user I have on my OS. 10.10.1.100 is the ip of my raspberry running everything.
2. ssh access is via ssh-key, hence you need to generate a key and save it once at the beginning. This can be done by accessing your docker container with _docker container exec -it nodered /bin/bash_. Then run _ssh-keygen -f /data/ssh/id\_nr -t rsa -b 4096_ and copy your certificate from your docker container to your OS via f.e. _ssh-copy-id -i /data/ssh/id\_nr [iq@10.10.1.100](mailto:iq@10.10.1.100)_
3. Finally refer to it, when you access it, like in my example with '-i /data/ssh/id\_nr'

---

_[View the full topic](https://discourse.nodered.org/t/node-red-in-a-docker-container-doesnt-seem-to-be-able-to-execute-some-programs-with-the-exec-node/78826)._
