wifi-connect icon indicating copy to clipboard operation
wifi-connect copied to clipboard

WiFi-connect installation in Raspberry Pi Docker container

Open jense-arntz opened this issue 3 years ago • 3 comments

Hi everyone!

I'm having a very hard time installing wifi-connect app in my raspberry pi docker container. I downloaded the wifi-connect source on my pi and built a docker image by using a Dockerfile. Below is a part of Dockerfile related to wifi-connect app installation. image But I got an error while running raspbian-install.sh. image So I installed systemd in my docker container by apt-get install systemd After that, I run the shell file again, but I also got an error saying that sudo command not found So I removed all sudo in the script and rerun it. Then I got another error. image I tried to solve this error, but I didn't any solution for it. And I tried other ways to install wifi-connect app in the docker container, but they didn't work for me.

  • How can I solve the error above?
  • Is there a better solution to install this app in the Raspberry Pi docker container?
  • Is it possible to install this balena app as a docker container? I see some description for using this app as a docker container in README. But is that only possible when using balenaOS? I see a docker image named as wifi-connect in dockerhub. Can I use it using docker-compose file?

Thanks in advance. Jense.

jense-arntz avatar Dec 25 '20 19:12 jense-arntz

[sradevski] This issue has attached support thread https://jel.ly.fish/fbbe5bef-efeb-4614-80f6-5b1ed33929fe

jellyfish-bot avatar Dec 29 '20 16:12 jellyfish-bot

[sradevski] This issue has attached support thread https://jel.ly.fish/2457064b-4b90-49da-9a39-c0a8cbf14744

jellyfish-bot avatar Dec 29 '20 16:12 jellyfish-bot

Hey @jense-arntz, looks like you're tangled up in abstraction here ;-) I'm no expert here, but just a few hints:

raspbian-install.sh is designed to install wifi-connect on Raspbian (the Debian-based operating system which was recently renamed to Raspberry Pi OS). You try to use it to install wifi-connect in a Docker container that is based on the Python base image. This will most likely be impossible, unless the Python base image happens to be based on Debian as well.

Another issue is that with wifi-connect you're trying to manipulate the WiFi connection on the host OS from within your Docker container. This is possible, but requires extra configuration. The whole idea of Docker is to abstract away the underlying host OS. So whenever you try to exchange information with the host OS, you have to allow the Docker container to do it.

Tbh, I haven't done this before so I can't tell you how it's done with vanilla Docker. But Balena does it via DBus and CAP_ADD directives, maybe this puts you on the right track: https://www.balena.io/docs/learn/develop/runtime/

Cheers Fred

frederikheld avatar Jan 03 '21 22:01 frederikheld