homeserver/print/Dockerfile

45 lines
913 B
Text
Raw Normal View History

2023-06-12 08:58:32 +02:00
FROM debian:bookworm
2022-10-01 23:25:04 +02:00
2024-02-09 13:52:01 +01:00
ENV DEBIAN_FRONTEND noninteractive
ENV TZ "Europe/Berlin"
2022-10-01 23:25:04 +02:00
# Install Packages (basic tools, cups, basic drivers, HP drivers)
RUN apt-get update \
&& apt-get install -y \
sudo \
whois \
usbutils \
cups \
cups-client \
cups-bsd \
cups-filters \
foomatic-db-compressed-ppds \
printer-driver-all \
openprinting-ppds \
hpijs-ppds \
hp-ppd \
hplip \
smbclient \
printer-driver-cups-pdf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
2024-02-09 13:52:01 +01:00
EXPOSE 631
2022-10-01 23:25:04 +02:00
# Add user and disable sudo password checking
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
# Copy the default configuration file
COPY --chown=root:lp cupsd.conf /etc/cups/cupsd.conf
# Default shell
CMD ["/usr/sbin/cupsd", "-f"]