Initial Commit
This commit is contained in:
commit
24cafe26b0
6
README.md
Normal file
6
README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Media_Automation
|
||||||
|
This project aims to build a docker container for personal use that will house the following applications:
|
||||||
|
|
||||||
|
* Filebot
|
||||||
|
* Flexget
|
||||||
|
* Custom script that will automate finding and downloading episodes/movies
|
35
dockerfile
Normal file
35
dockerfile
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
FROM phusion/baseimage
|
||||||
|
|
||||||
|
MAINTAINER Zepheris <zepheris.craty@gmail.com>
|
||||||
|
|
||||||
|
#RUN rm -f /etc/service/sshd/down
|
||||||
|
|
||||||
|
# Regenerate SSH host keys. baseimage-docker does not contain any, so you
|
||||||
|
# have to do that yourself. You may also comment out this instruction; the
|
||||||
|
# init system will auto-generate one during boot.
|
||||||
|
#RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
|
||||||
|
|
||||||
|
CMD ["/sbin/my_init"]
|
||||||
|
|
||||||
|
ENV PKGS deluge-console python-pip nano sshpass mediainfo openjdk-8-jre wget shellinabox rsync ffmpeg jq git
|
||||||
|
ENV TERM xterm
|
||||||
|
ENV LANG en_US.UTF-8
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y $PKGS && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN pip install --upgrade pip && \
|
||||||
|
pip install --upgrade setuptools &&\
|
||||||
|
pip install flexget &&\
|
||||||
|
pip install youtube-dl
|
||||||
|
|
||||||
|
RUN wget -O /tmp/filebot.deb 'https://app.filebot.net/download.php?type=deb&arch=amd64' && \
|
||||||
|
dpkg -i /tmp/filebot.deb && \
|
||||||
|
rm /tmp/filebot.deb
|
||||||
|
|
||||||
|
RUN useradd -u 99 -g 100 -m zepheris
|
||||||
|
|
||||||
|
ADD startup.sh /etc/my_init.d/startup.sh
|
||||||
|
RUN chmod +x /etc/my_init.d/startup.sh
|
BIN
science-chemistry-icon.png
Normal file
BIN
science-chemistry-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
34
startup.sh
Normal file
34
startup.sh
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#Check for a user password. If non, then set password to newpassword
|
||||||
|
if [ -z "$PASSWORD" ]; then
|
||||||
|
echo "Setting default SSH password to newpassword"
|
||||||
|
echo "zepheris:newpassword" | chpasswd
|
||||||
|
else
|
||||||
|
echo "SSH Password is $PASSWORD"
|
||||||
|
echo "zepheris:$PASSWORD" | chpasswd
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown zepheris:users -R /config/
|
||||||
|
chown root:root /config/cron/cron_get
|
||||||
|
|
||||||
|
if [ ! -d /home/zepheris/.filebot ]; then setuser zepheris ln -s /config/.filebot /home/zepheris/.filebot; fi
|
||||||
|
if [ ! -d /home/zepheris/.flexget ]; then setuser zepheris ln -s /config/.flexget /home/zepheris/.flexget; fi
|
||||||
|
if [ ! -d /home/zepheris/.ssh ]; then setuser zepheris ln -s /config/.ssh /home/zepheris/.ssh; fi
|
||||||
|
if [ ! -d /home/zepheris/.gitconfig ]; then setuser zepheris ln -s /config/.gitconfig /home/zepheris/.gitconfig; fi
|
||||||
|
if [ ! -d /home/zepheris/.bashrc ]; then setuser zepheris ln -s /config/.bashrc /home/zepheris/.bashrc; fi
|
||||||
|
if [ ! -f /etc/cron.d/cron_get ]; then ln -s /config/cron/cron_get /etc/cron.d/cron_get; fi
|
||||||
|
|
||||||
|
#function to stop services and exit the container
|
||||||
|
_term() {
|
||||||
|
echo "Caught SIGTERM Signal"
|
||||||
|
echo "Stopping all services"
|
||||||
|
service shellinabox stop
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'kill ${!}; _term' SIGTERM
|
||||||
|
|
||||||
|
echo -e "Starting Web SSH"
|
||||||
|
service shellinabox start
|
Loading…
Reference in New Issue
Block a user