-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
executable file
·82 lines (70 loc) · 1.94 KB
/
dockerfile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM debian:stable-slim
RUN apt-get update && apt-get install -y \
# curl \
# sudo \
locales \
# whois \
cups \
# cups-filters \
cups-pdf \
printer-driver-all \
#####
sudo \
whois \
# usbutils \
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
####
# inotify-tools \
# python3-cups
#&& rm -rf /var/lib/apt/lists/*
RUN sed -i "s/^#\ \+\(en_US.UTF-8\)/\1/" /etc/locale.gen \
&& locale-gen en_US en_US.UTF-8
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LANGUAGE=en_US:en
#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
# Clean downloads and cache
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /var/lib/apt/lists/partial
#COPY etc/cups/cupsd.conf /etc/cups/cupsd.conf
EXPOSE 631/tcp
EXPOSE 445/tcp
EXPOSE 139/tcp
EXPOSE 5353/udp
#ENTRYPOINT ["/usr/sbin/cupsd", "-f"]
# We want a mount for these
#VOLUME /config
#VOLUME /services
VOLUME /etc/cups
# Add scripts
ADD root /
RUN chmod +x /root/*
CMD ["/root/run_cups.sh"]
# Copy the default configuration file
COPY --chown=root:lp etc/cups/* /etc/cups_default/
## 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/<Location \/>/<Location \/>\n Allow All/' /etc/cups/cupsd.conf && \
# sed -i 's/<Location \/admin>/<Location \/admin>\n Allow All\n Require user @SYSTEM/' /etc/cups/cupsd.conf && \
# sed -i 's/<Location \/admin\/conf>/<Location \/admin\/conf>\n Allow All/' /etc/cups/cupsd.conf && \
# echo "ServerAlias *" >> /etc/cups/cupsd.conf && \
# echo "DefaultEncryption Never" >> /etc/cups/cupsd.conf