Python – How to create a directory inside docker with permissions

I have the following docker-compose.yml file: version: ‘3’ services: my_service: build: . container_name: my_container network_mode: "host" volumes: – ./script:/script and the following Dockerfile FROM python:latest COPY . . CMD [ "python", "./script/test.py"] test.py: import os os.makedirs(‘/script/my_new_folder_timestamp_here’, 0o0777) The test.py script creates a directory inside the container, with a name that is only known at run […]

By ChrisChris2323
Published
Categorised as docker, python Tagged ,

ROS – How to start a python script that launches master using Docker

I have a python file that executes a bash script. That bash script starts a ros master by running roslaunch rosbridge_server rosbridge_websocket.launch Python file works as expected when ran on its own. Now I want to start that python script using a Dockerfile (or Docker container). I’ve seen this tutorial but this doesn’t help me […]

By ChrisChris2323
Published
Categorised as docker, python, ros Tagged , ,

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq