# Azure docker settings.js location

**URL:** <https://discourse.nodered.org/t/azure-docker-settings-js-location/52301>\
**Category:** General\
**Tags:** docker\
**Created:** [16 October 2021 15:40 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301 "2021-10-16T15:40:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ulysses.codes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ulysses.codes/32/49510_2.png) [@ulysses.codes](https://discourse.nodered.org/u/ulysses.codes)\
**Post date:** [16 October 2021 15:40 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301/1 "2021-10-16T15:40:51Z")

</div>

When pulling the latest docker image onto an Azure container instance, the settings file ends up in the user directory instead of the mounted file share at `/data`.

Any way to avoid this so `settings.js` is on the file share? Would prefer not to write my own dockerfile if possible.

Cheers

Logs:

```auto
16 Oct 15:32:11 - [info] Node-RED version: v2.0.6
16 Oct 15:32:11 - [info] Node.js version: v14.17.6
16 Oct 15:32:11 - [info] Linux 5.4.81-microsoft-standard x64 LE
16 Oct 15:32:11 - [info] Loading palette nodes
16 Oct 15:32:22 - [info] Settings file : /usr/src/node-red/node_modules/node-red/settings.js
16 Oct 15:32:22 - [info] Context store : 'default' [module=memory]
16 Oct 15:32:22 - [info] User directory : /data
16 Oct 15:32:22 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Oct 15:32:22 - [info] Flows file : /data/flows.json
16 Oct 15:32:22 - [info] Server now running at http://127.0.0.1:1880/

```

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [16 October 2021 17:00 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301/2 "2021-10-16T17:00:21Z")

</div>

The default image will put (copy it from `/usr/src/node-red/node_modules/node-red` if there isn't already one present) the settings.js in the `/data` directory as this is the default userDir for the container.

The only way it should be using the settings.js from `/usr/src/node-red/node_modules/node-red/` is if you have explicitly asked it to by adding the `--settings` command line argument to the container.

I don't use azure, but there should be a way to get a full list of arguments that have been passed to the container some where?

---

<div class="post-metadata">

**Author:** ![ulysses.codes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ulysses.codes/32/49510_2.png) [@ulysses.codes](https://discourse.nodered.org/u/ulysses.codes)\
**Post date:** [16 October 2021 17:19 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301/3 "2021-10-16T17:19:19Z")

</div>

There was no `--settings` command given, just the default command:

```auto
> node-red-docker@2.0.6 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

```

After adding a `settings.js` to `/data` manually it pulls from the right location. Very strange.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [16 October 2021 17:38 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301/4 "2021-10-16T17:38:33Z")

</div>

It's the volume writeable by uid 1000?

---

<div class="post-metadata">

**Author:** ![ulysses.codes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ulysses.codes/32/49510_2.png) [@ulysses.codes](https://discourse.nodered.org/u/ulysses.codes)\
**Post date:** [16 October 2021 17:57 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301/5 "2021-10-16T17:57:26Z")

</div>

Should be - it saves flows.js and all the credentials as expected.

---

<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:** [30 October 2021 17:57 UTC](https://discourse.nodered.org/t/azure-docker-settings-js-location/52301/6 "2021-10-30T17:57:37Z")

</div>

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