Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
28e51a0580 |
22
DockerFile
Normal file
22
DockerFile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
FROM microsoft/dotnet:1.1-sdk-projectjson
|
||||||
|
MAINTAINER Poag <poag@gany.net>
|
||||||
|
|
||||||
|
WORKDIR /opt/
|
||||||
|
|
||||||
|
#Install required software
|
||||||
|
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 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
|
||||||
|
|
||||||
|
VOLUME ["/opt"]
|
||||||
|
|
||||||
|
CMD ["/opt/nadeko.sh"]
|
46
Dockerfile
46
Dockerfile
@ -1,46 +0,0 @@
|
|||||||
# Download Ubuntu base image from phusion
|
|
||||||
# https://github.com/phusion/baseimage-docker
|
|
||||||
FROM phusion/baseimage:latest
|
|
||||||
|
|
||||||
# Define working directory
|
|
||||||
WORKDIR /opt/
|
|
||||||
|
|
||||||
# Prepare for Basic stuff
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install software-properties-common apt-transport-https curl -y
|
|
||||||
|
|
||||||
# Register the trusted Microsoft signature key
|
|
||||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
|
||||||
RUN mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
|
|
||||||
|
|
||||||
# Register the Microsoft Product feed for your distro version
|
|
||||||
RUN sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
|
|
||||||
|
|
||||||
# Add ffmpeg3 ppa
|
|
||||||
RUN add-apt-repository ppa:jonathonf/ffmpeg-3
|
|
||||||
|
|
||||||
# Updating existing tools
|
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
|
|
||||||
|
|
||||||
# Install Git
|
|
||||||
RUN apt-get update && apt-get install -y git
|
|
||||||
|
|
||||||
# Install .Net Core
|
|
||||||
RUN apt-get update && apt-get install -y dotnet-sdk-2.0.0
|
|
||||||
|
|
||||||
# Install Redis-server
|
|
||||||
RUN apt-get update && apt-get install -y redis-server
|
|
||||||
|
|
||||||
# Install required software
|
|
||||||
RUN apt-get update && apt-get install -y libopus0 opus-tools libopus-dev libsodium-dev ffmpeg rsync python python3-pip
|
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
#Download and install stable version of Nadeko
|
|
||||||
RUN curl -H "Cache-Control: no-cache" https://raw.githubusercontent.com/willysunny/Nadecker/master/nadeko_installer_2_5_7.sh -o ./nadeko_installer.sh && chmod 755 nadeko_installer.sh && ./nadeko_installer.sh
|
|
||||||
RUN curl -O -H "Cache-Control: no-cache" https://raw.githubusercontent.com/willysunny/Nadecker/master/nadeko_autorestart.sh && chmod 755 nadeko_autorestart.sh
|
|
||||||
|
|
||||||
VOLUME ["/root/nadeko"]
|
|
||||||
|
|
||||||
CMD ["sh","/opt/nadeko_autorestart.sh"]
|
|
7
build.sh
7
build.sh
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "You need to specify a version."
|
|
||||||
exit
|
|
||||||
else
|
|
||||||
docker build -t mattburchett/nadeko-$1 .
|
|
||||||
fi
|
|
@ -1,32 +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 "Patching Nadeko Data Folder"
|
|
||||||
mkdir -p /root/nadeko/patch
|
|
||||||
cd /root/nadeko/patch && bash "./patch.sh"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Starting Redis-Server"
|
|
||||||
/usr/bin/redis-server --daemonize yes
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Running NadekoBot with auto restart Please wait."
|
|
||||||
cd /opt/NadekoBot/src/NadekoBot
|
|
||||||
while :; do dotnet run -c Release; sleep 5s; done
|
|
||||||
echo "Done"
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,52 +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 release --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 add /opt/NadekoBot/src/NadekoBot package ImageSharp --version 1.0.0-alpha9-00194 --source https://www.myget.org/F/imagesharp/api/v3/index.json
|
|
||||||
dotnet build --configuration Release
|
|
||||||
echo ""
|
|
||||||
echo "Building done."
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Installation Complete."
|
|
||||||
exit 0
|
|
Reference in New Issue
Block a user