-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
53 lines (39 loc) · 1.69 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 debian:bullseye
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y wget gpg sudo && \
wget -qO /tmp/hyperion.pub.key https://apt.hyperion-project.org/hyperion.pub.key && \
gpg --dearmor -o - /tmp/hyperion.pub.key > /usr/share/keyrings/hyperion.pub.gpg && \
echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ bullseye main" > /etc/apt/sources.list.d/hyperion.list && \
wget -qO /tmp/hyperion.nightly.pub.key https://nightly.apt.hyperion-project.org/hyperion.pub.key && \
gpg --dearmor -o - /tmp/hyperion.pub.key > /usr/share/keyrings/hyperion.nightly.pub.gpg && \
echo "deb [signed-by=/usr/share/keyrings/hyperion.nightly.pub.gpg] https://nightly.apt.hyperion-project.org/ bullseye main" > /etc/apt/sources.list.d/hyperion.nightly.list.disabled && \
apt-get update && \
apt-get install -y hyperion && \
apt-get -y --purge autoremove gpg && \
apt-get clean
# Flatbuffers Server port
EXPOSE 19400
# JSON-RPC Server Port
EXPOSE 19444
# Protocol Buffers Server port
EXPOSE 19445
# Boblight Server port
EXPOSE 19333
# Philips Hue Entertainment mode (UDP)
EXPOSE 2100
# HTTP and HTTPS Web UI default ports
EXPOSE 8090
EXPOSE 8092
ENV UID=1000
ENV GID=1000
RUN groupadd -f hyperion
RUN useradd -r -s /bin/bash -g hyperion hyperion
RUN echo "#!/bin/bash" > /start.sh
RUN echo "groupmod -g \$2 hyperion" >> /start.sh
RUN echo "usermod -u \$1 hyperion" >> /start.sh
RUN echo "chown -R hyperion:hyperion /config" >> /start.sh
RUN echo "sudo -u hyperion /usr/bin/hyperiond -v --service -u /config" >> /start.sh
RUN chmod 777 /start.sh
VOLUME /config
CMD [ "bash", "-c", "/start.sh ${UID} ${GID}" ]