Execute .launch file on starting an existing container
Hi!
I am new to Docker and ROS. From what I understand, it is possible to execute a file (say a .py) on the start of a container by including the name of the file in the CMD section of the dockerfile.
I wanted to execute a .launch file as soon as I start a container. The container is being used (via the Portainer UI) to access files on the raspberry pi. How can I do this?
Thanks!
This would be no(t significantly) different from starting anything "non ROS" in a Docker container.
We're here to help, but what have you found yourself already? You refer to the "
CMD
section", so you must have already found / tried something.Thanks for responding. I have tried to manually write the dockerfile by looking at other containers (from the same project that i'm working on -Duckietown) and filling in ENTRYPOINT and CMD, but it fails to build the image. I can't even seem to find the files that the other containers reference.
without showing at least your
Dockerfile
and giving more information about file & directory layout this is still too vague.