forked from fcauwe/brother-scan
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
34 lines (26 loc) · 950 Bytes
/
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
FROM python:3.6
MAINTAINER Esben Haabendal, [email protected]
# This is where the scan output will be written to
VOLUME /output
# This must be mapped to ${ADVERTISE_IP}:54925
EXPOSE 54925/udp
# Install required Debian packages
RUN apt-get update -q \
&& apt-get install -q -y sane sane-utils poppler-utils libusb-0.1-4 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install required python modules
COPY requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt
# Install Brother scanner driver
COPY brscan4-0.4.4-1.amd64.deb /tmp/
RUN dpkg --install /tmp/brscan4-*.deb
# Fixup symbolic links
RUN mkdir /usr/lib/sane \
&& for f in /usr/lib64/sane/libsane-brother*;do ln -s $f /usr/lib/sane/;done
# Install brscan (run "setup.py build sdist" before docker build)
COPY dist/brscan-0.0.1.tar.gz /tmp/
RUN pip install --no-binary :all: /tmp/brscan-*.tar.gz
# Add run script and set it as default command
ADD run.sh /
CMD /run.sh