-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
39 lines (33 loc) · 862 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
35
36
37
38
39
FROM resin/rpi-raspbian
MAINTAINER Ammon Sarver <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
sudo \
locales \
whois \
cups \
cups-client \
cups-bsd \
printer-driver-all \
hpijs-ppds \
hp-ppd \
hplip
RUN sed -i "s/^#\ \+\(en_US.UTF-8\)/\1/" /etc/locale.gen \
&& locale-gen en_US en_US.UTF-8
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LANGUAGE=en_US:en
RUN 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 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /var/lib/apt/lists/partial
COPY etc-cups/cupsd.conf /etc/cups/cupsd.conf
EXPOSE 631
ENTRYPOINT ["/usr/sbin/cupsd", "-f"]