Closed StevePoling closed 1 year ago
I'm afraid the Dockerfile was contributed by @alexellis and I don't have the first clue how to get it working. I'm crossing fingers that invoking his good name will cause him to magically appear and fix all our woes, though!
Hi there. I can take a look at getting this working again, but it's going to take me a few days to set up an RPi and find a Blinkt etc.
Hi Definately not a regular docker user but I do have a Raspberry Pi 4 running Buster and Docker I did confirm that blinkt examples worked on the Pi before creating the docker image.
Note my pi user can execute docker commands
$ sudo usermod -aG docker pi
Using the docker file below it worked for me.
FROM balenalib/rpi-raspbian:buster
RUN apt-get update -qy && apt-get install -qy \
git \
python \
python-rpi.gpio
ENTRYPOINT []
RUN git clone https://github.com/pimoroni/blinkt.git /blinkt
WORKDIR /blinkt/library
RUN python setup.py install
WORKDIR /blinkt/examples/
CMD ["python", "larson.py"]
Built the container using:
$ docker build -t blinkt .
Execute using:
$ docker run --privileged -ti blinkt
Hope this helps.
Thank you! This helps a lot.
The distinctions that made the difference between failing and succeeding are:
On Fri, Aug 21, 2020 at 6:36 AM Phil Willis notifications@github.com wrote:
Hi Definately not a regular docker user but I do have a Raspberry Pi 4 running Buster and Docker I did confirm that blinkt examples worked on the Pi before creating the docker image.
Note my pi user can execute docker commands $ sudo usermod -aG docker pi
Using the docker file below it worked for me.
FROM balenalib/rpi-raspbian:buster RUN apt-get update -qy && apt-get install -qy \ git \ python \ python-rpi.gpio ENTRYPOINT [] RUN git clone https://github.com/pimoroni/blinkt.git /blinkt WORKDIR /blinkt/library RUN python setup.py install WORKDIR /blinkt/examples/ CMD ["python", "larson.py"]
Built the container using: $ docker build -t blinkt .
Execute using: $ docker run --privileged -ti blinkt
Hope this helps.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pimoroni/blinkt/issues/88#issuecomment-678209063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPNAZQHEGZTSEXTCLRQVMDSBZEZNANCNFSM4QGTC32Q .
Thanks fellow Phil @ptbw 😁
So it looks like this line in the Dockerfile should be replaced?
https://github.com/pimoroni/blinkt/blob/3969699c8c72d1699c237fd80141b5c037460277/Dockerfile#L1
And also some documentation tweaks to state it should be run privileged? In fact the README.md doesn't mention Docker at all.
NP. @Gadgetoid
Would you like me to create a PR to update the Dockerfile and add some instructions to the readme? (Basically expand on my comments above).
i could do the PR write-up, i understand the problem, and what Alex did to fix it. tho i might not do as well as you. i'd feel i'm slacking if i don't at least volunteer
On Fri, Aug 21, 2020 at 5:41 PM Phil Willis notifications@github.com wrote:
NP. @Gadgetoid https://github.com/Gadgetoid
Would you like me to create a PR to update the Dockerfile and add some instructions to the readme? (Basically expand on my comments above).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pimoroni/blinkt/issues/88#issuecomment-678528841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPNAZTZHDC6Q5HJHJ66CYTSB3SZFANCNFSM4QGTC32Q .
@StevePoling be my guest, expand on my comments and review the PR that included the original Dockerfile. It seems sensible to add a note about updating the image for the future.
Note: I am deleting the Dockerfile as part of #102 since I have changed a lot of things, and don't have the ability to fix it.
Once #102 is merged I would welcome a PR re-adding it, if it's useful. With any luck there wont be another big change like this down the road.
I'd support that decision :smile:
The Dockerfile doesn't seem to work for me. So, I made some tweaks.
This allowed me to successfully build a docker image, but when I run it I get this unhappy message:
Is there something I'm missing to tell python-rpi, or docker that I'm running on an RPi4?
MacOS wouldn't let me attach my Dockerfile. So here it is inline: