-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (37 loc) · 861 Bytes
/
Dockerfile
File metadata and controls
41 lines (37 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# base image
ARG ARCH=amd64
FROM $ARCH/debian:buster-slim
# install packages
RUN apt-get update \
&& apt-get install -y \
sudo \
usbutils \
whois \
cups \
cups-client \
cups-bsd \
cups-filters \
foomatic-db-compressed-ppds \
printer-driver-all \
openprinting-ppds \
hpijs-ppds \
hp-ppd \
hplip \
smbclient \
printer-driver-brlaser \
printer-driver-cups-pdf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Add user and disable sudo password check
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"]