forked from quadportnick/docker-cups-airprint
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
55 lines (49 loc) · 1.47 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
FROM ubuntu:jammy
LABEL maintainer="znetwork@me.com"
LABEL version="0.3"
LABEL description="AIRPRINT FROM SYNOLOGY DSM 7 (HP, SAMSUNG, ETC)"
RUN apt-get update && apt-get install -y \
locales \
brother-lpr-drivers-extra brother-cups-wrapper-extra \
printer-driver-splix \
printer-driver-gutenprint \
gutenprint-doc \
gutenprint-locales \
libgutenprint9 \
libgutenprint-doc \
ghostscript \
hplip \
cups \
cups-pdf \
cups-client \
cups-filters \
inotify-tools \
avahi-daemon \
avahi-discover \
python3 \
python3-dev \
python3-pip \
python3-cups \
wget \
rsync \
&& 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 *:631/' /etc/cups/cupsd.conf && \
sed -i 's/Browsing No/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 && \
sed -i 's/.*enable\-dbus=.*/enable\-dbus\=no/' /etc/avahi/avahi-daemon.conf && \
echo "ServerAlias *" >> /etc/cups/cupsd.conf && \
echo "DefaultEncryption Never" >> /etc/cups/cupsd.conf && \
echo "BrowseWebIF Yes" >> /etc/cups/cupsd.conf