Skip to content

Commit b8b0f5a

Browse files
committed
Reduce Docker size
1 parent 030950b commit b8b0f5a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM resin/rpi-raspbian
22

3-
RUN apt-get update && apt-get install wget apt-transport-https -y --force-yes
4-
RUN wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | apt-key add -
5-
RUN echo "deb https://dev2day.de/pms/ jessie main" > /etc/apt/sources.list.d/pms.list
6-
RUN apt-get update && apt-get install -t jessie plexmediaserver -y
3+
RUN apt-get update && apt-get install wget apt-transport-https -y --force-yes && \
4+
wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | apt-key add - && \
5+
echo "deb https://dev2day.de/pms/ jessie main" > /etc/apt/sources.list.d/pms.list && \
6+
apt-get update && apt-get install -t jessie plexmediaserver -y
77

88
EXPOSE 32400
99

@@ -13,4 +13,5 @@ VOLUME /media
1313
ADD daemon.sh /root/daemon.sh
1414
RUN chmod +x /root/daemon.sh
1515

16-
ENTRYPOINT ["/root/daemon.sh"]
16+
ENTRYPOINT ["bash"]
17+
CMD ["/root/daemon.sh"]

daemon.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
2-
trap 'kill -TERM $PID' TERM INT
2+
trap 'kill -TERM $PID' TERM INT SIGTERM SIGINT
3+
rm /root/Library/Application\ Support/Plex\ Media\ Server/plexmediaserver.pid
34
/usr/sbin/start_pms &
45
PID=$!
56
wait $PID
67
wait $PID
7-
rm /root/Library/Application\ Support/Plex\ Media\ Server/plexmediaserver.pid
88
EXIT_STATUS=$?

0 commit comments

Comments
 (0)