Open pavelsr opened 7 years ago
Possible solution: use arm32v6/alpine:3.6
in dockerfile
Steps to reproduce the problem:
docker run pavelsr/fabkey:armhf gpio readall
Check with raspbian:
arm32v7/debian:stretch
resin/rpi-raspbian
Dockerfile1:
FROM arm32v7/debian:stretch
RUN apt-get update && \
apt-get install wiringpi
Dockerfile2
FROM resin/rpi-raspbian
RUN apt-get update && \
apt-get install wiringpi
docker build -t paveslr/fabkey-strecth -f Dockerfile1 .
docker run -it paveslr/fabkey-strecth gpio readall
Result:
arm32v7/debian:stretch
: E: Unable to locate package wiringpi
resin/rpi-raspbian
:
wiringPiSetup: Unable to open /dev/mem or /dev/gpiomem: No such file or directory. Try running with sudo?
Working:
docker run -it --privileged paveslr/fabkey-resin gpio readall
Ok but
E: Unable to locate package perl-dev
E: Unable to locate package openssl-dev
So let's try with following Dockerfile:
libperl-dev
libssl-dev
Wiring pi (gpio) script without sudo:
#!/bin/bash
PIN=22
gpio export $PIN out
gpio -g write $PIN 1
sleep 3
gpio -g write $PIN 0
printf 1;