-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-v3
52 lines (47 loc) · 2.5 KB
/
Dockerfile-v3
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 jeedom/jeedom:latest
MAINTAINER [email protected]
# Remove Mariadb
RUN apt-get remove -y mariadb-client mariadb-common mariadb-server
# Preload homebridge install script
RUN mkdir -p /tmp/homebridge/resources
ADD plugins/homebridge/install_homebridge.sh /tmp/homebridge/resources/install_homebridge.sh
# Install script for additional setup
ADD install/setup.sh /root/setup.sh
## Preinstall dependencies
RUN export DEBIAN_FRONTEND=noninteractive && \
# RFlink needs nodejs at least v14
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - && \
# Update base image
apt-get update && apt-get -y dist-upgrade && \
# Mysql client & git && dumb-init
apt-get install --no-install-recommends -y default-mysql-client git dumb-init && \
# Plugin Network : fix ping
apt-get install --no-install-recommends -y iputils-ping && \
# Plugin Z wave
mkdir -p /tmp/jeedom/openzwave/ && cd /tmp && \
git clone https://github.com/jeedom/plugin-openzwave.git && cd plugin-openzwave && git checkout master && cd resources && \
chmod u+x ./install_apt.sh && ./install_apt.sh && cd /tmp && rm -Rf plugin-openzwave && \
# Plugin Homebridge
cd /tmp/homebridge/resources && chmod u+x ./install_homebridge.sh && ./install_homebridge.sh && cd /tmp && \
# Camera
# Note: libav-tools python-imaging are deprecated
apt-get install --no-install-recommends -y ffmpeg python-pil php-gd && \
# Freebox OS
apt-get install --no-install-recommends -y android-tools-adb netcat && \
# PlayTTS
apt-get install --no-install-recommends -y libsox-fmt-mp3 sox libttspico-utils mplayer mpg123 lsb-release software-properties-common && \
cd /tmp && \
git clone https://github.com/lunarok/jeedom_playtts.git && cd jeedom_playtts && git checkout master && cd resources && \
sed -i 's/sudo usermod -a -G audio `whoami`/sudo usermod -a -G audio www-data/' ./install.sh && \
chmod u+x ./install.sh && ./install.sh && cd /tmp && rm -Rf jeedom_playtts && \
# RFlink needs nodejs at least v12
apt-get install --no-install-recommends -y nodejs avrdude && \
cd /var/www && npm install && ln -s `which node` `which node`js && \
# Reduce image size
apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && \
# Install v3
sed -i 's/.*\/root\/install.sh -s 6.*/\/root\/install.sh -s 6 -v master/' /root/init.sh && \
#Setup
sed -i 's/.*service atd restart.*/service atd restart\n. \/root\/setup.sh/' /root/init.sh
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["sh", "/root/init.sh"]