Added files via upload

This commit is contained in:
Poag 2016-05-05 09:16:33 +01:00
parent 0ffa85f60d
commit 13e753a42e

43
DockerFile Normal file
View File

@ -0,0 +1,43 @@
FROM linuxserver/baseimage
MAINTAINER Uirel <uirel@gany.net>
# Setup Mono Repo
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF &&\
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
# Install Pre Requisites
RUN add-apt-repository ppa:mc3man/trusty-media -y
RUN apt-get -q update && \
apt-get install -qy wget libopus0 opus-tools libopus-dev mono-devel unzip ffmpeg
# Get NadekoBot Latest
RUN curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\
unzip /root/NadekoBot.latest.zip -d /root/NadekoBot
##Setup Certificates
#RUN mozroots --import --ask-remove --machine &&\
#certmgr --ssl https://gateway.discord.gg
#Test config files present
RUN cred="/config/credentials.json" &&\
if [ -f "$cred" ] ; then echo "Credentials exist" ; else cp /root/NadekoBot/credentials_example.json /config/credentials.json ; fi
RUN sql="/config/nadekobot.sqlite" &&\
if [ -f "$sql" ] ; then echo "SQLite DB exists" ; else echo "" > /config/nadekobot.sqlite ;fi
#Adding Config file sym links
RUN ln /config/credentials.json /root/NadekoBot/credentials.json &&\
ln /config/nadekobot.sqlite /root/NadekoBot/data/nadekobot.sqlite
#Mappings and ports
VOLUME ["/config"]
#Clean Up
RUN apt-get autoclean -y; apt-get autoremove -y &&\
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#Run Bot
WORKDIR /root/NadekoBot &&\
mono NadekoBot.exe