# Node-red-docker fails to build docker images

**URL:** <https://discourse.nodered.org/t/node-red-docker-fails-to-build-docker-images/22268>\
**Category:** General\
**Created:** [26 February 2020 02:25 UTC](https://discourse.nodered.org/t/node-red-docker-fails-to-build-docker-images/22268 "2020-02-26T02:25:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moolbits](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/moolbits/32/17526_2.png) [@moolbits](https://discourse.nodered.org/u/moolbits)\
**Post date:** [26 February 2020 02:25 UTC](https://discourse.nodered.org/t/node-red-docker-fails-to-build-docker-images/22268/1 "2020-02-26T02:25:28Z")

</div>

Currently if you clone down [node-red-docker](https://github.com/node-red/node-red-docker) and run the `docker-custom/docker-make.sh` script it fails to complete with an error:

```auto
rm: '/tmp/v8-compile-cache-0' is a directory
The command '/bin/sh -c chown -R node-red:node-red /usr/src/node-red && /tmp/install_devtools.sh && rm /tmp/*' returned a non-zero code: 1

```

I was able to fix the issue by adding a recursive flag to the `RUN` instruction in the `Dockerfile.custom` on line 70. Here is an example of that step with the fix:

```auto
# Chown, install devtools & Clean up
RUN chown -R node-red:node-red /usr/src/node-red && \
    /tmp/install_devtools.sh && \
    rm -r /tmp/*

```

_After making the PR I noticed that the CI builds were failing for the same reason, so I added the proposed fix to that as well._

---

<div class="post-metadata">

**Author:** ![moolbits](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/moolbits/32/17526_2.png) [@moolbits](https://discourse.nodered.org/u/moolbits)\
**Post date:** [26 February 2020 05:05 UTC](https://discourse.nodered.org/t/node-red-docker-fails-to-build-docker-images/22268/2 "2020-02-26T05:05:42Z")

</div>

Created an [issue](https://github.com/node-red/node-red-docker/issues/169) and [PR](https://github.com/node-red/node-red-docker/pull/170) with proposed fix.

---

<div class="post-metadata">

**Author:** ![moolbits](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/moolbits/32/17526_2.png) [@moolbits](https://discourse.nodered.org/u/moolbits)\
**Post date:** [26 February 2020 21:14 UTC](https://discourse.nodered.org/t/node-red-docker-fails-to-build-docker-images/22268/3 "2020-02-26T21:14:16Z")

</div>

Fix was merged!

---

<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:** [11 March 2020 21:14 UTC](https://discourse.nodered.org/t/node-red-docker-fails-to-build-docker-images/22268/4 "2020-03-11T21:14:19Z")

</div>

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