diff --git a/Dockerfile b/Dockerfile index f31ad4c..df36389 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,53 +1,51 @@ -#FROM ubuntu:16.04 FROM ubuntu:22.04 -RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y install tzdata && apt-get -y clean +ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && apt-get -y clean - -RUN apt-get -y update && apt-get -y upgrade && apt-get -y clean -RUN apt-get -y install \ - sane \ - sane-utils \ +RUN apt-get update && \ + apt-get -y --no-install-recommends install \ + bc \ + curl \ ghostscript \ - netpbm \ - x11-common \ - wget \ graphicsmagick \ - curl \ - ssh \ - sshpass \ - lighttpd \ - php-cgi \ - php-curl \ - sudo \ iproute2 \ jq \ - bc \ + lighttpd \ + netbase \ + netpbm \ pdftk \ + php-cgi \ + php-curl \ poppler-utils \ - && apt-get -y clean - -RUN cd /tmp && \ - wget https://download.brother.com/welcome/dlf105200/brscan4-0.4.11-1.amd64.deb && \ - dpkg -i /tmp/brscan4-0.4.11-1.amd64.deb && \ - rm /tmp/brscan4-0.4.11-1.amd64.deb + python3 \ + sane \ + sane-utils \ + ssh \ + sshpass \ + sudo \ + tzdata \ + wget \ + x11-common && \ + apt-get -y clean && \ + rm -rf /var/lib/apt/lists/* RUN cd /tmp && \ - wget https://download.brother.com/welcome/dlf006652/brscan-skey-0.3.1-2.amd64.deb && \ - dpkg -i /tmp/brscan-skey-0.3.1-2.amd64.deb && \ - rm /tmp/brscan-skey-0.3.1-2.amd64.deb + wget https://download.brother.com/welcome/dlf105200/brscan4-0.4.11-1.amd64.deb -O /tmp/brscan4.deb && \ + wget https://download.brother.com/welcome/dlf006652/brscan-skey-0.3.2-0.amd64.deb -O /tmp/brscan-skey.deb && \ + dpkg -i --force-all /tmp/brscan4.deb && \ + dpkg -i --force-all /tmp/brscan-skey.deb && \ + rm -f /tmp/brscan4.deb /tmp/brscan-skey.deb ADD files/runScanner.sh /opt/brother/runScanner.sh COPY script /opt/brother/scanner/brscan-skey/script -RUN cp /etc/lighttpd/conf-available/05-auth.conf /etc/lighttpd/conf-enabled/ -RUN cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/ -RUN cp /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/ -RUN mkdir -p /var/run/lighttpd -RUN touch /var/run/lighttpd/php-fastcgi.socket -RUN chown -R www-data /var/run/lighttpd -RUN echo 'www-data ALL=(NAS) NOPASSWD:ALL' >> /etc/sudoers +RUN cp /etc/lighttpd/conf-available/05-auth.conf /etc/lighttpd/conf-enabled/ && \ + cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/ && \ + cp /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/ && \ + mkdir -p /var/run/lighttpd && \ + touch /var/run/lighttpd/php-fastcgi.socket && \ + chown -R www-data /var/run/lighttpd && \ + echo 'www-data ALL=(NAS) NOPASSWD:ALL' >> /etc/sudoers ENV NAME="Scanner" ENV MODEL="MFC-L2700DW" @@ -55,28 +53,24 @@ ENV IPADDRESS="192.168.1.123" ENV USERNAME="NAS" ENV REMOVE_BLANK_THRESHOLD="0.3" -#only set these variables in the compose file, if inotify needs to be triggered (e.g., for Synology Drive): +# Only set these variables in the compose file, if inotify needs to be triggered (e.g., for Synology Drive): ENV SSH_USER="" ENV SSH_PASSWORD="" ENV SSH_HOST="" ENV SSH_PATH="" -#only set these variables in the compose file, if you need FTP upload: +# Only set these variables in the compose file, if you need FTP upload: ENV FTP_USER="" ENV FTP_PASSWORD="" ENV FTP_HOST="" -#only set these variables in the compose file, if you need Telegram notifications: +# Only set these variables in the compose file, if you need Telegram notifications: ENV TELEGRAM_TOKEN="" ENV TELEGRAM_CHATID="" # Make sure this ends in a slash. ENV FTP_PATH="/scans/" -EXPOSE 54925 -EXPOSE 54921 -EXPOSE 80 - #ADD files/gui/index.php /var/www/html #ADD files/gui/main.css /var/www/html #ADD files/api/scan.php /var/www/html @@ -85,9 +79,8 @@ EXPOSE 80 #ADD files/api/download.php /var/www/html COPY html /var/www/html RUN chown -R www-data /var/www/ + #directory for scans: VOLUME /scans CMD /opt/brother/runScanner.sh - -