Merge pull request #885 from Reiuiji/dev

Docker stuff, thanks to Reiuiji
This commit is contained in:
Master Kwoth 2016-12-12 15:33:06 +01:00 committed by GitHub
commit ed91e6b3e9
3 changed files with 80 additions and 0 deletions

40
docker/README.md Normal file
View File

@ -0,0 +1,40 @@
NadekoBot Docker Image
======================
This is a Docker setup for NadekoBot
Usage
-----
The docker image creates a volume to hold the NadekoBot application to be able to quickly edit the credentials and data.
To initialize NadekoBot, run this:
`docker run --name=NadekoBot -t reiuiji/nadekobot:stable`
If you want to create a separate volume to handle the data for NadekoBot run the following.
```Nadeko_DATA="NadekoBot-data"
docker volume create --name $Nadeko_DATA
docker run --name=NadekoBot -v $Nadeko_DATA:/opt -t reiuiji/nadekobot:stable
```
If you want to link the volumes you can link credentials.json and data individual.
`-v /path/to/credentials.json:/opt/NadekoBot/src/NadekoBot/credentials.json`
`-v /path/to/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data`
If you want to use the latest developmental version then change tag from "stable" to "dev".
`docker run --name=NadekoBot -t reiuiji/nadekobot:dev`
Build
-----
There are two versions of the docker container for stable and dev branches. Select dev if you want latest unstable build or select stable for latest stable build.
Once you selected the build process you want now enter that directory and build the docker image.
`docker build -t reiuiji/nadekobot .`

20
docker/dev/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM microsoft/dotnet:sdk
MAINTAINER Reiuiji <reiuiji@gmail.com>
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 curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer_latest.sh | sh \
&& curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_autorestart.sh > nadeko.sh \
&& chmod 755 nadeko.sh
VOLUME ["/opt"]
CMD ["/opt/nadeko.sh"]

20
docker/stable/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM microsoft/dotnet:sdk
MAINTAINER Reiuiji <reiuiji@gmail.com>
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 curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh \
&& curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_autorestart.sh > nadeko.sh \
&& chmod 755 nadeko.sh
VOLUME ["/opt"]
CMD ["/opt/nadeko.sh"]