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 $@