FROM ubuntu:bionic # Add repos RUN echo 'deb [trusted=yes] http://www.openprinting.org/download/printdriver/debian/ lsb3.2 main contrib main-nonfree' >> /etc/apt/sources.list.d/multiverse.list # Install the packages we need. Avahi will be included RUN apt-get update && apt-get install -y \ brother-lpr-drivers-extra brother-cups-wrapper-extra openprinting-ppds-postscript-brother\ cups \ cups-pdf \ inotify-tools \ python-cups \ && rm -rf /var/lib/apt/lists/* # This will use port 631 EXPOSE 631 # We want a mount for these VOLUME /config VOLUME /services # Add scripts ADD root / RUN chmod +x /root/* #Run Script CMD ["/root/run_cups.sh"] # Baked-in config file changes RUN sed -i 's/Listen localhost:631/Listen 0.0.0.0:631/' /etc/cups/cupsd.conf && \ sed -i 's/Browsing Off/Browsing On/' /etc/cups/cupsd.conf && \ sed -i 's//\n Allow All/' /etc/cups/cupsd.conf && \ sed -i 's//\n Allow All\n Require user @SYSTEM/' /etc/cups/cupsd.conf && \ sed -i 's//\n Allow All/' /etc/cups/cupsd.conf && \ echo "ServerAlias *" >> /etc/cups/cupsd.conf && \ echo "DefaultEncryption Never" >> /etc/cups/cupsd.conf