# How to pack examples under \`Import \> Examples \> flows\` UI when building custom node-RED Docker Containers?

**URL:** <https://discourse.nodered.org/t/how-to-pack-examples-under-import-examples-flows-ui-when-building-custom-node-red-docker-containers/63689>\
**Category:** General\
**Tags:** docker\
**Created:** [9 June 2022 16:08 UTC](https://discourse.nodered.org/t/how-to-pack-examples-under-import-examples-flows-ui-when-building-custom-node-red-docker-containers/63689 "2022-06-09T16:08:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)\
**Post date:** [9 June 2022 16:08 UTC](https://discourse.nodered.org/t/how-to-pack-examples-under-import-examples-flows-ui-when-building-custom-node-red-docker-containers/63689/1 "2022-06-09T16:08:38Z")

</div>

I have the following `package.json` file

```json
{
    "name": "node-red-contrib-personal",
    "version": "1.0.0",
    "description": "Node-RED package developed by me",
    "dependencies": {
        "node-red": ">=2.2.0",
        "node-red-dashboard": "3.1.7",
        "node-red-contrib-iiot-opcua": "4.0.1",
        "node-red-contrib-influxdb": "0.6.1",
        "node-red-node-mysql": "1.0.1",
        "node-red-node-rbe": "0.5.0",
        "node-red-node-smooth": "0.1.2",
        "node-red-contrib-modbus": "5.21.2",
        "node-red-contrib-ui-led": "0.4.11",
        "node-red-node-random": "0.4.0",
        "node-red-node-email": "1.15.1",
        "node-red-node-data-generator": "1.0.1",
        "node-red-node-ui-table": "0.3.12"
    },
    "files": [
        "examples"
      ],
    "keywords": [
        "node-red"
    ],
    "scripts": {
        "start": "node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS --userDir=/data"
    }
}

```

my `Dockerfile`:

```nohighlight
FROM nodered/node-red:2.2.2 as build

COPY package.json .

RUN npm install --unsafe-perm --no-update-notifier --no-audit --only=production

FROM build as prod

# Copy assets to `/data` directory
COPY ./data /data

CMD ["npm", "start"]

```

This builds the container will all the necessary dependencies but I am not sure where should I add my folder of `examples` to in the container?

My project structure is as follows:

```auto
.
├── Dockerfile
├── README.md
├── data
│ ├── flows.json
│ └── settings.js
├── examples
│ ├── Example1InfluxDB.json
│ ├── Example1MQTT.json
│ ├── Example1MySQL.json
│ ├── Example2Influxdb.json
│ ├── Example2MQTT.json
│ ├── Example2MySql.json
└── package.json

```

I have tried entering the docker container via:

```auto
docker exec -it custom-node-red-container /bin/bash

```

and tried searching for `node-red-contrib-personal` within the `node_modules/` directory in the `/usr/src/node-red` working directory as well as under `/data/node_modules/` directory

but neither the directory nor the examples are available.

Are there some steps that I might have missed here?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 June 2022 16:14 UTC](https://discourse.nodered.org/t/how-to-pack-examples-under-import-examples-flows-ui-when-building-custom-node-red-docker-containers/63689/2 "2022-06-09T16:14:39Z")

</div>

The only way to add example flows is through a Node installed in the palette.

[https://nodered.org/docs/creating-nodes/examples](https://nodered.org/docs/creating-nodes/examples)

---

<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:** [9 June 2022 16:26 UTC](https://discourse.nodered.org/t/how-to-pack-examples-under-import-examples-flows-ui-when-building-custom-node-red-docker-containers/63689/3 "2022-06-09T16:26:15Z")

</div>

But you could add entries to the library (not examples) by placing the files in `/data/lib/flows` directory

---

<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:** [8 August 2022 16:26 UTC](https://discourse.nodered.org/t/how-to-pack-examples-under-import-examples-flows-ui-when-building-custom-node-red-docker-containers/63689/4 "2022-08-08T16:26:39Z")

</div>

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