Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (51 loc) · 2.16 KB
/
Copy pathDockerfile
File metadata and controls
58 lines (51 loc) · 2.16 KB
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
FROM anujdatar/cups
RUN apt-get update && \
apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
python3 \
sane-utils \
unzip \
&& rm -rf /var/lib/apt/lists/*
COPY generate_tdp245_ppd.py /usr/local/bin/generate_tdp245_ppd.py
COPY entrypoint.sh /usr/local/bin/akiba-cups-entrypoint.sh
RUN chmod 755 /usr/local/bin/akiba-cups-entrypoint.sh
COPY sane/saned.conf /etc/sane.d/saned.conf
# Сборка и установка драйвера LBP810/1120
RUN git clone https://github.com/caxapyk/capt_lbp810-1120.git && \
cd capt_lbp810-1120/capt-0.1 && \
make clean && \
make CFLAGS="-O2 -g -DDEBUG" && \
make install
# Install TSPL filters from the official Linux package and generate
# single-purpose fixed label PPDs from the filter-compatible SP410 profile.
RUN set -eux; \
tmpdir="$(mktemp -d)"; \
cd "$tmpdir"; \
curl -L -o idprt.zip "https://www.idprt.com/prt_v2/files/down_file/id/283/fid/668.html"; \
unzip -q idprt.zip; \
case "$(dpkg --print-architecture)" in \
amd64) filter_arch="x64" ;; \
i386) filter_arch="x86" ;; \
*) echo "unsupported TSPL driver architecture: $(dpkg --print-architecture)" >&2; exit 1 ;; \
esac; \
install -m 755 "idprt_tspl_printer_linux_driver_v1.4.7/filter/${filter_arch}/raster-tspl" /usr/lib/cups/filter/raster-tspl; \
install -m 755 "idprt_tspl_printer_linux_driver_v1.4.7/filter/${filter_arch}/raster-esc" /usr/lib/cups/filter/raster-esc; \
install -d -m 755 /usr/share/cups/model/tspl; \
install -m 644 idprt_tspl_printer_linux_driver_v1.4.7/ppd/*.ppd /usr/share/cups/model/tspl/; \
python3 /usr/local/bin/generate_tdp245_ppd.py \
idprt_tspl_printer_linux_driver_v1.4.7/ppd/sp410.tspl.ppd \
/usr/share/cups/model/tspl/TDP-245-fixed-tspl.ppd \
30 \
20 \
2; \
python3 /usr/local/bin/generate_tdp245_ppd.py \
idprt_tspl_printer_linux_driver_v1.4.7/ppd/sp410.tspl.ppd \
/usr/share/cups/model/tspl/TDP-245-fixed-58x40-tspl.ppd \
58 \
40 \
2; \
rm -rf "$tmpdir"
ENTRYPOINT ["/usr/local/bin/akiba-cups-entrypoint.sh"]