forked from zajac-grzegorz/homeassistant-addon-cups-airprint
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
52 lines (44 loc) · 1.12 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
FROM ghcr.io/hassio-addons/debian-base:7.1.0
LABEL io.hass.version="1.0" io.hass.type="addon" io.hass.arch="aarch64|amd64"
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sudo \
locales \
cups \
avahi-daemon \
libnss-mdns \
dbus \
colord \
printer-driver-all \
printer-driver-brlaser \
printer-driver-gutenprint \
openprinting-ppds \
hpijs-ppds \
hp-ppd \
hplip \
printer-driver-foo2zjs \
cups-pdf \
gnupg2 \
lsb-release \
nano \
samba \
bash-completion \
procps \
whois \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
COPY rootfs /
# Add user and disable sudo password checking
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
EXPOSE 631
RUN chmod a+x /run.sh
CMD ["/run.sh"]