Docker Image with GrovePi

Hi, I’m trying to run GrovePi in a Docker container but the process for setting up GrovePi involved a Restart step that exits the build process with an error code. Is there a way to get around that step or utilize the Grove shield in a docker image some other way? Thanks!

Hey jshen130, we’re not familiar with docker, so we’d love to hear more about what you’re doing.

The restart process is required to implement the changes you make to the kernel, most important initializing the i2c lines. Is there a way you can initialize the i2c lines for the GrovePi in Docker without a restart?

I’m trying to build a distributed network of sensors running similar applications on Docker.

Docker works by creating containers to run applications and I’m hoping maybe there’s a way to port the files from the initialization step into the container rather than running the setup process within the container (which causes an error because of the reboot). Are the kernel/I2C configurations or python dependencies stored in a specific accessible place?

Hey,
There are a few bare minimum things that you need to set up for GrovePi to work. The setup script installs it system-wide: https://github.com/DexterInd/GrovePi/blob/master/Script/install.sh. The things that really matter are:

  1. the software packages: https://github.com/DexterInd/GrovePi/blob/master/Script/install.sh#L67
  2. changes in the Kernel files https://github.com/DexterInd/GrovePi/blob/master/Script/install.sh#L80-L127
  3. changes in pythonpath https://github.com/DexterInd/GrovePi/blob/master/Script/install.sh#L150

The Pi needs to be restarted in order to make these changes work. You can try to get these changes in your docker containers and try to make them work.

Do let us know how it goes.

-Karan

I wonder if there is some premade docker container with this, that also updates firmware

Not offered by Dexter, that’s certain, sorry.