-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
56 lines (43 loc) · 1.48 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
FROM debian:jessie
MAINTAINER Matt OConnell <moconnell@66feet.com>
# Install cups - poppler-utils allow for PDF processing
RUN apt-get update && apt-get install -y \
cups \
cups-pdf \
whois \
poppler-utils
# Build and install S3FS
RUN apt-get install -y build-essential \
git \
libfuse-dev \
libcurl4-openssl-dev \
libxml2-dev mime-support \
automake \
libtool
RUN apt-get install -y pkg-config \
libssl-dev
RUN cd /usr/src && git clone https://github.com/s3fs-fuse/s3fs-fuse
RUN cd /usr/src/s3fs-fuse/ && ./autogen.sh && ./configure --prefix=/usr --with-openssl && make && make install
# Build and install node & PDF util
RUN apt-get update -y && apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates
RUN mkdir /nodejs && curl http://nodejs.org/dist/v4.4.4/node-v4.4.4-linux-x64.tar.xz | tar xJf - -C /nodejs --strip-components=1
ENV PATH $PATH:/nodejs/bin
RUN npm install -g pdf-to-text
# Some clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set up podbot
ADD podbot /usr/local/podbot
RUN chmod +x /usr/local/podbot/node_cmd.sh
# Set up CUPS
ADD etc-cups /etc/cups
VOLUME /etc/cups/
VOLUME /var/log/cups
VOLUME /var/spool/cups
VOLUME /var/cache/cups
# add dir where s3 mount will go
RUN mkdir /var/spool/cups-pdf/REVEAL
RUN chown nobody:nogroup /var/spool/cups-pdf/REVEAL
EXPOSE 631
ADD start_cups.sh /root/start_cups.sh
RUN chmod +x /root/start_cups.sh
CMD ["/root/start_cups.sh"]