forked from Trefex/cups-syno-hl3070cw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (33 loc) · 1.87 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
FROM centos:centos7
RUN yum install epel-release -y && \
yum update -y && \
yum -y install cups cups-client cups-libs cups-pdf ghostscript-cups \
cups-filters cups-filters-libs cups-filesystem \
python-cups && \
yum -y --setopt tsflags= reinstall cups && \
yum -y install file a2ps libstdc++.i686 glibc.i686 policycoreutils-python wget inotify inotify-tools && \
rm -rf /var/cache/yum
RUN wget -T 10 -nd --no-cache http://www.brother.com/pub/bsc/linux/packages/hl2270dwlpr-1.1.2-1.i386.rpm && \
wget -T 10 -nd --no-cache http://www.brother.com/pub/bsc/linux/packages/cupswrapperHL2270DW-2.0.4-2.i386.rpm && \
rpm -ihv --nodeps --replacefiles --replacepkgs hl2270dwlpr-1.1.2-1.i386.rpm && \
rpm -ihv --nodeps --replacefiles --replacepkgs cupswrapperHL2270DW-2.0.4-2.i386.rpm && \
rm -rf hl3070cwlpr-1.1.2-1.i386.rpm hl3070cwcupswrapper-1.1.2-2.i386.rpm
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 && \
sed -i '/SystemGroup sys root$/ s/$/ wheel/' /etc/cups/cups-files.conf
# Add scripts
ADD root /
RUN chmod +x /root/* && \
mv /root/airprint.types /usr/share/cups/mime/ && \
mv /root/airprint.convs /usr/share/cups/mime/
CMD ["/root/run_cups.sh"]
# This will use port 631
EXPOSE 631
# We want a mount for these
VOLUME /config
VOLUME /services