# Docker/Network/Port/Directory/Volume

**URL:** <https://discourse.nodered.org/t/docker-network-port-directory-volume/37843>\
**Category:** General\
**Created:** [21 December 2020 13:43 UTC](https://discourse.nodered.org/t/docker-network-port-directory-volume/37843 "2020-12-21T13:43:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietrofduarte](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pietrofduarte/32/29882_2.png) [@pietrofduarte](https://discourse.nodered.org/u/pietrofduarte)\
**Post date:** [21 December 2020 13:43 UTC](https://discourse.nodered.org/t/docker-network-port-directory-volume/37843/1 "2020-12-21T13:43:18Z")

</div>

Hi guys I am with a huge question about Node-Red in Docker. I need build four different containers in docker of Node-Red but I need run each container with a fix IPV4 in one specific docker-network, with a specific door (outside web) and with specific volumes for save the flows and configurations. After the command the container loose the configuration of network. Any one has the same problem? Any one know the right solution? The order of command influence the result?

**Looking for my command in terminal linux:**

docker run --network rede\_triumph -d -it -p 1881:1880 --ip 172.18.0.5 -v /home/pietro/.node-red-triumph:/data --name node-red-triumph nodered/node-red

**docker run**

--network rede\_triumph (network that was create in docker with ipv4 172.18.0.0/20)  
-d -it (persistence and run in back ground)  
-p (publish in external door 1881 and internal 1880)  
--ip 172.18.0.5 (fixed ip of rede\_triumph)  
-v (directory where the data need be storage)  
.--name (name of container)  
nodered (image official)

**The explanation:**  
I need fix the IP for each container and application (docker-compose, API, DB), and need too put the files of configuration and flows out of container to recreate the container in case of crash.

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [21 December 2020 14:20 UTC](https://discourse.nodered.org/t/docker-network-port-directory-volume/37843/2 "2020-12-21T14:20:47Z")

</div>

> [@pietrofduarte](#):
>
> After the command the container loose the configuration of network

What do you mean by this ?

---

<div class="post-metadata">

**Author:** ![pietrofduarte](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pietrofduarte/32/29882_2.png) [@pietrofduarte](https://discourse.nodered.org/u/pietrofduarte)\
**Post date:** [21 December 2020 17:16 UTC](https://discourse.nodered.org/t/docker-network-port-directory-volume/37843/3 "2020-12-21T17:16:36Z")

</div>

@janvda I think discovery the problem. All the linux command are right, the mistake are in give the permission to the directory.

This command need come first: sudo chown -R 1000:1000 .node-red-triumph`  
I am not so sure about what, but I will find more answers.

---

<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:** [19 February 2021 17:16 UTC](https://discourse.nodered.org/t/docker-network-port-directory-volume/37843/4 "2021-02-19T17:16:53Z")

</div>

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