Skip to content

Instantly share code, notes, and snippets.

@dvdvnl
Last active June 21, 2019 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvdvnl/5d27e49b656794d1677e09692d6eb786 to your computer and use it in GitHub Desktop.
Save dvdvnl/5d27e49b656794d1677e09692d6eb786 to your computer and use it in GitHub Desktop.
Docker: MFP with CUPS and SANE (Gist for https://www.davole.com/2019/docker-mfp-cups-sane/)
FROM debian:stable
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y sudo whois usbutils
# Install & configure CUPS
RUN apt-get install -y cups hplip hp-ppd hpijs-ppds
COPY ./cupsd.conf /etc/cups/cupsd.conf
# Add CUPS user
RUN useradd --groups=sudo,lp,lpadmin --create-home --home-dir=/home/print --shell=/bin/bash --password=$(mkpasswd print) print \
&& sed -i '/%sudo[[:space:]]/ s/ALL[[:space:]]*$/NOPASSWD:ALL/' /etc/sudoers
EXPOSE 631/tcp 631/udp
CMD ["/usr/sbin/cupsd", "-f"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment