Compare commits

..

1 Commits
1.4 ... master

Author SHA1 Message Date
Poag
28e51a0580 Update DockerFile 2017-07-05 09:35:59 +01:00
3 changed files with 15 additions and 101 deletions

View File

@ -1,27 +1,22 @@
FROM phusion/baseimage:latest
FROM microsoft/dotnet:1.1-sdk-projectjson
MAINTAINER Poag <poag@gany.net>
WORKDIR /opt/
#Install Dotnet
RUN sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 \
&& apt-get update && apt-get install -y dotnet-dev-1.0.4
#Add ffmpeg3 ppa
RUN add-apt-repository ppa:jonathonf/ffmpeg-3
#Install required software
RUN apt-get update && apt-get install -y git libopus0 opus-tools libopus-dev libsodium-dev ffmpeg rsync python tzdata
#Add youtube-dl
RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && chmod a+rx /usr/local/bin/youtube-dl
RUN echo "deb http://www.deb-multimedia.org jessie main non-free" | tee /etc/apt/sources.list.d/debian-backports.list \
&& apt-get update \
&& apt-get install -y --force-yes deb-multimedia-keyring \
&& apt-get update \
&& apt-get install -y git libopus0 opus-tools libopus-dev libsodium-dev ffmpeg
#Download and install stable version of Nadeko
RUN curl -O https://raw.githubusercontent.com/mattburchett/nadeko/1.4/nadeko_installer_1_4.sh && chmod 755 nadeko_installer_1_4.sh && ./nadeko_installer_1_4.sh \
&& curl -O https://raw.githubusercontent.com/mattburchett/nadeko/1.4/nadeko_autorestart.sh && chmod 755 nadeko_autorestart.sh
VOLUME ["/root/nadeko"]
RUN wget https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer_latest.sh \
&& chmod 755 nadeko_installer_latest.sh \
&& /opt/nadeko_installer_latest.sh \
&& wget -O nadeko.sh https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_autorestart.sh \
&& chmod 755 nadeko.sh
CMD ["sh","/opt/nadeko_autorestart.sh"]
VOLUME ["/opt"]
CMD ["/opt/nadeko.sh"]

View File

@ -1,30 +0,0 @@
#!/bin/sh
if hash dotnet 2>/dev/null
then
echo "Dotnet installed."
else
echo "Dotnet is not installed. Please install dotnet."
exit 1
fi
echo ""
echo "Linking Nadeko Credentials"
mv -n /opt/NadekoBot/src/NadekoBot/credentials.json /root/nadeko/credentials.json > /dev/null 2>&1
rm /opt/NadekoBot/src/NadekoBot/credentials.json > /dev/null 2>&1
ln -s /root/nadeko/credentials.json /opt/NadekoBot/src/NadekoBot/credentials.json > /dev/null 2>&1
#echo ""
#echo "Linking Nadeko Data Folder"
#mkdir -p /root/nadeko/data
#rsync --ignore-existing -rt /opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/ /root/nadeko/data/
#rm -rf /opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/ > /dev/null 2>&1
#ln -s /root/nadeko/data/ /opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data > /dev/null 2>&1
echo ""
echo "Running NadekoBot with auto restart Please wait."
cd NadekoBot/src/NadekoBot
while :; do dotnet run -c Release; sleep 5s; done
echo "Done"
exit 0

View File

@ -1,51 +0,0 @@
#!/bin/sh
echo ""
echo "NadekoBot Installer started."
if hash git 1>/dev/null 2>&1
then
echo ""
echo "Git Installed."
else
echo ""
echo "Git is not installed. Please install Git."
exit 1
fi
if hash dotnet 1>/dev/null 2>&1
then
echo ""
echo "Dotnet installed."
else
echo ""
echo "Dotnet is not installed. Please install dotnet."
exit 1
fi
root=/opt
cd "$root"
echo ""
echo "Downloading NadekoBot, please wait."
git clone -b 1.4 --recursive --depth 1 https://github.com/mattburchett/NadekoBot.git
echo ""
echo "NadekoBot downloaded."
echo ""
echo "Downloading Nadeko dependencies"
cd $root/NadekoBot
dotnet restore
echo ""
echo "Download done"
echo ""
echo "Building NadekoBot"
dotnet build --configuration Release
echo ""
echo "Building done."
echo ""
echo "Installation Complete."
exit 0