forked from RichardChmielek/pi-cups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
53 lines (45 loc) · 1.02 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
FROM balenalib/armv7hf-debian:latest
RUN apt-get update && apt-get install -y \
curl \
sudo \
locales \
whois \
cups \
cups-filters \
cups-pdf \
cups-client \
cups-bsd \
printer-driver-all \
lsb-release
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
RUN sudo apt-get update \
&& sudo apt-get install -y \
wget \
dc \
git \
make \
build-essential \
vim
RUN git clone https://github.com/koenkooi/foo2zjs.git \
&& cd foo2zjs \
&& make \
&& make install
COPY etc/cups/cupsd.conf /etc/cups/cupsd.conf
COPY entrypoint.sh /
EXPOSE 631
ENTRYPOINT /entrypoint.sh