Added start script

This commit is contained in:
Jonathan Ervine 2020-07-20 15:35:18 +08:00
parent 4e3c0f60c5
commit e43dde5973
2 changed files with 10 additions and 6 deletions

View File

@ -7,10 +7,6 @@ MAINTAINER “Jonathan Ervine” <docker@ervine.org>
ENV LANG='en_US.UTF-8' \
LANGUAGE='en_US.UTF-8' \
TERM='xterm' \
TORRENT_USER='mediaservice' \
TORRENT_GROUP='mediaservice' \
TORRENT_UID='1003' \
TORRENT_GID='1003'
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk update && \
@ -23,6 +19,8 @@ RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositorie
rmdir combustion-release && \
rm release.zip
COPY start.sh /usr/loca/bin/start.sh
#ADD UTC /etc/localtime
RUN rm -rf /var/cache/apk/* && \
@ -33,6 +31,5 @@ EXPOSE 9091
VOLUME /config
USER $TORRENT_USER
CMD [ "/usr/bin/transmission-daemon", "-f", "-g", "/config/" ]
CMD [ "/usr/local/bin/start.sh" ]

7
start.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
#
## Script to kick off Transmission
#
addgroup -g $GID $USER
adduser -D -u $UID -G $USER -H $USER
su - $USER -c "/usr/bin/transmission-daemon -f -g /config/"