Kkula
Hello Everyone,
I am new to app development on Edge Device using Dockers. I am trying to develop a python program which uses the CSV data logged by the node-red docker on IPC. Files that I need access to will change over time (new data will be added every minute). The CSV file is located under path - 'home/edge/sim-edge-data/sim-edge-platform-node-red/files'.
Is it possible to access this csv file from my python app docker? Attached is the docker compose file used to dockerise the python app.
Any suggestions will be appreciated.
Hello!
Yes, it is possible to access the CSV file from your Python app Docker container. However, due to the Docker isolation, you'll need to use a volume mount to share the directory containing the CSV file between the Node-RED container and your Python app container.
Here's how you can modify your docker-compose.yml file:
version: "3.7"
services:
your_python_app:
image: your_python_image
volumes:
- /home/edge/sim-edge-data/sim-edge-platform-node-red/files:/app/data
# ... other configurations ...
Explanation:
/home/edge/sim-edge-data/sim-edge-platform-node-red/files: This is the path on the host (Edge Device) where the Node-RED CSV files are stored./app/data: This is the path inside your Python app container where the CSV files will be accessible. You can adjust this path to suit your Python application's needs.In your Python code, you would then access the files using the path /app/data/*.csv.
For detailed information on volume mounts and Docker Compose, refer to the official Docker Compose documentation and Docker Volumes documentation.
If you encounter any further issues, please provide the complete docker-compose.yml file and details about how you are trying to access the CSV file in your Python code.
Our flexible community website is a platform that allows users to connect, share information, and collaborate on various topics of interest. The website offers a range of features such as discussion forums, messaging, user profiles, event calendars, and more. Users can customize their experience by creating and joining different groups or communities based on their interests or location. The website is designed to be user-friendly and adaptable to the needs and preferences of our diverse user base. Whether you are looking to network professionally, share hobbies and interests, or simply connect with like-minded individuals, our flexible community website has something for everyone. Join us today and become a part of our thriving online community!
India
Copyright ©2025
Share this page with your family and friends.