forked from jacobalberty/cups-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (35 loc) · 1.23 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
FROM debian:buster-slim
MAINTAINER Jacob Alberty <[email protected]>
ARG DEBIAN_FRONTEND=noninteractive
ARG CUPS_VERSION=2.3.3
ARG FILTERS_VERSION=1.27.4
ARG QPDF_VERSION=10.0.1
ENV PREFIX=/usr/local/docker
ENV VOLUME=/config
COPY patches /home/patches
COPY build.sh ./build.sh
COPY fakePkg.sh ${PREFIX}/bin/fakePkg.sh
COPY docker-entrypoint.sh ${PREFIX}/bin/docker-entrypoint.sh
COPY docker-healthcheck.sh ${PREFIX}/bin/docker-healthcheck.sh
COPY drivers ${PREFIX}/share/drivers
COPY functions ${PREFIX}/functions
RUN chmod +x \
${PREFIX}/bin/docker-entrypoint.sh \
${PREFIX}/bin/docker-healthcheck.sh \
${PREFIX}/share/drivers/*.sh \
${PREFIX}/functions
RUN chmod +x ./build.sh ${PREFIX}/bin/fakePkg.sh && \
sync && \
./build.sh && \
rm -f ./build.sh && \
cupsctl --remote-admin --remote-any --share-printers && \
useradd \
--groups=sudo,lp,lpadmin --create-home --home-dir=/home/print \
--shell=/bin/bash \
--password=$(mkpasswd print) \
print &&\
sed -i '/%sudo[[:space:]]/ s/ALL[[:space:]]*$/NOPASSWD:ALL/' /etc/sudoers
VOLUME ["/config"]
EXPOSE 631/tcp 631/udp
HEALTHCHECK CMD ${PREFIX}/bin/docker-healthcheck.sh
ENTRYPOINT ${PREFIX}/bin/docker-entrypoint.sh /usr/sbin/cupsd -f