From 9ab93c129960b97c4be1d9ad934f7f4e398279ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Fjord=C3=A9n?= Date: Tue, 26 May 2020 23:06:17 +0200 Subject: [PATCH] Modification to get it to work on 64 bit CPU, where PROT_EXEC had to be removed. There is a PR for this at https://github.com/joan2937/pigpio/pull/342. Removed -a 1 flags from pigpiod since it gives errors on Ubuntu Server 20.04 on 64 bit ARM. --- Dockerfile | 6 +++--- entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4929a65..d9a3ce6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -FROM alpine - +FROM alpine:3.9 STOPSIGNAL 9 - RUN apk --update --no-cache add --virtual build-dependencies build-base && \ cd /tmp && \ wget https://github.com/joan2937/pigpio/archive/master.zip && \ unzip -qq master.zip && \ cd pigpio-master && \ + sed -i 's/|PROT_EXEC,/,/g' pigpio.c && \ make && \ sed -i 's/ldconfig/ldconfig \/usr\/local/g' Makefile && \ make install && \ @@ -15,5 +14,6 @@ RUN apk --update --no-cache add --virtual build-dependencies build-base && \ apk --no-cache add tini COPY entrypoint.sh /entrypoint.sh +RUN chmod u+x /entrypoint.sh ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index 9d1f8ed..df57a51 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,4 +7,4 @@ echo "Starting PigPiod..." # gpiod sometimes leaves pid files around, just clean them rm -f /var/run/pigpio.pid -exec /usr/local/bin/pigpiod -g -a 1 $@ +exec /usr/local/bin/pigpiod -g $@