Blueos-ros Dockerfile Directory Location

Hello,

I am using the BlueOS-ROS Extension in order to run a control system through MAVROS for drone applications. I need to install some dependencies needed for my ROS nodes (specifically the navigator-lib library so I can access the ADC port on the flight controller). However, I am not sure where the Dockerfile is located that is used to generate the docker container used for the extension. This is making it very difficult to install my dependencies, as I have to do it manually and I would like to automate the process upon instantiation of the docker container.

Would anybody know where the Dockerfile is located or can help me install my dependencies within the ROS Extension?

Hi @rstar0509 -
Is this the repository you’re looking for? I found it via the extensions repository.

Yes, that is the repository I am using, but that does not answer my question. I need to know the directory where this repository is installed on the raspberry pi through the BlueOS API, so I can find that Dockerfile and modify it to suit my needs.

I already have the BlueOS ROS Extension installed, I just need assistance installing dependencies within the docker container it uses. As it currently stands I have developed a bash file to install the packages I need to run my ROS launch file, but its a manual process that I would like to automate. The easiest way is to locate where the Dockerfile that instantiates the ROS extension docker container is located and add the installation commands there, but I’m having trouble locating the directory where it is installed.

Hi @rstar0509 ,

The Dockerfiles are not present in BlueOS itself. the extensions are mostly built by github actions.
The Dockerfile for the ROS extension is here:

But it is not being built by an action yet.

If you want to add things to BlueOS core itself, you can add them here:

I’m a bit confused by what you are saying here. Are you telling me that every time the ros extension docker container is created on the raspberry pi, it is done by reaching for the Dockerfile located in this github repository?

That seems like an odd explanation, given that my raspberry pi isn’t typically connected to the Internet, but is still capable of creating the docker container, so I think I’m missing something in your explanation.

Additionally, if BlueOS is reaching to these directories to instantiate the docker containers, then I either need to access to the github repository that its reaching to or need to change the path of the github repository that its fetching information from to create the docker container.

I’m not sure how to proceed with what you’ve given me here. Is there a way to modify these Dockerfiles in the repositories you’ve provided me in a way that I can add commands to install the dependencies I need for my docker container to run properly?

Here’s how it works:

The Dockerfiles are in these github repositories.
A github action (or someone manually, following instructions like these) runs docker build in order to create a “Docker Image”. The image is uploaded to DockerHub.
When you install an extension in BlueOS, it pulls the image from Dockerhub, and stores it locally.
With the local image, it can instantiate new containers as it wishes.

What you need to do is to fork the ROS extension, add your new scripts, build and deploy a new image (I recommend using this action). Then you can just change the installed extension to use your new dockerhub remote and tags.

oh, you could also do docker exec -it <container_name> /bin/bash to get access to a terminal and maybe install things there. then you could do docker commit <container_id> <new_image_name> to save the new image.

That is not as maintainable, but sure is faster.

This is in essence what I’ve been doing up until now and like you said its not particularly maintainable because the changes don’t really persist past reboots.

Thank you for your reply on developing a custom ROS extension. I’ll probably go that route, seems like the best method for creating what I need. Have a nice day!

Actually, if you tag it with the same base name and a different tag, you can just switch to the new tag in the “Installed extensions” section:


(you will need to copy over the “original settings” to “user settings” due to a bug)

In this case, could have done docker commit <container_id> williangalvani/blueos-extension-proxy:iframes

1 Like

Oh wow, I didn’t know that. That will be much quicker than setting up the custom extension. I’ll try implementing this first, thanks so much for the tip!

2 Likes

2 posts were split to a new topic: How to determine “User Custom Settings” for custom extension