-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (27 loc) · 984 Bytes
/
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
FROM phusion/baseimage
MAINTAINER Jason Kingsbury
RUN apt-get -q update
# Install cron & dev stuff
RUN apt-get -y install cron build-essential make libxml-sax-expat-perl
# Get prereq perl stuff
RUN cpan File::Copy::Recursive File::Glob LWP::Simple TVDB::API Getopt::Long Switch WWW::TheMovieDB XML::Simple JSON::Parse
# Let's prep the handbrake install
RUN mkdir -p /data/bin && mkdir -p /data/in && mkdir -p /data/movies && mkdir -p /data/episodes && mkdir -p /data/music
# Pull the latest handbrake batch script
ENV HOME /root
COPY sorttvcron /data/bin/
COPY sorttv.pl /data/bin/
COPY sorttv.conf /data/bin/
RUN chmod 755 /data/bin/sorttv.pl
# Setup Cron Job
RUN cat /data/bin/sorttvcron >> /etc/crontab
# Setup Cron Log
RUN touch /var/log/sorttv.log
# Setup Cron Entrypoint
ENTRYPOINT ["cron"]
# Setup Volumes
VOLUME ["/data/in"]
VOLUME ["/data/movies"]
VOLUME ["/data/episodes"]
# Define default command.
CMD ["cron", "-f", "&&", "tail", "-f", "/var/log/sorttv.log"]