# Change userdir of docker image

**URL:** https://discourse.nodered.org/t/change-userdir-of-docker-image/23246
**Category:** General
**Created:** [17 March 2020 20:30 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246 "2020-03-17T20:30:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![aderici](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aderici/32/37279_2.png) [@aderici](https://discourse.nodered.org/u/aderici)
#### Post date: [17 March 2020 20:30 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/1 "2020-03-17T20:30:01Z")

</div>

Hi,

the docker images in the node red docker hub has a command built in that starts the node red with the user dir of /data . I would like to change that to make it /home what is the best way to achieve this? Can i somehow avoid making my own copy of the docker image so that i wont have trouble upgrading to newer ones,

Best regards,

---

<div class="post-metadata">

### Author: ![techraf](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/techraf/32/17389_2.png) [@techraf](https://discourse.nodered.org/u/techraf)
#### Post date: [17 March 2020 21:10 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/2 "2020-03-17T21:10:30Z")

</div>

Why would you want that? I'm curious.

---

<div class="post-metadata">

### Author: ![aderici](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aderici/32/37279_2.png) [@aderici](https://discourse.nodered.org/u/aderici)
#### Post date: [17 March 2020 21:13 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/3 "2020-03-17T21:13:32Z")

</div>

thanks for your interest. I am using microsoft azure platform and web app for containers service.

It automatically persists /home folder for docker containers and nothing else. I would like to utilize this feature specifically.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [17 March 2020 21:27 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/4 "2020-03-17T21:27:15Z")

</div>

the project is hosted here - [https://github.com/node-red/node-red-docker](https://github.com/node-red/node-red-docker) - you can use the docker-custom to build your own image if you like.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [17 March 2020 21:27 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/5 "2020-03-17T21:27:37Z")

</div>

I would probably make that `/home/nrdata` or some such rather than pushing everything into the root home folder.

I'm no Docker expert by any means but I think that you would need to build your own docker image to get this to work?

---

<div class="post-metadata">

### Author: ![aderici](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aderici/32/37279_2.png) [@aderici](https://discourse.nodered.org/u/aderici)
#### Post date: [24 March 2020 11:13 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/6 "2020-03-24T11:13:39Z")

</div>

Thank you all, i ended up using @dceejay s answer to build my own custom image and uploading to docker hub.

---

<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: [7 April 2020 11:13 UTC](https://discourse.nodered.org/t/change-userdir-of-docker-image/23246/7 "2020-04-07T11:13:49Z")

</div>

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