ralph
Member
- Apr 13, 2016
- 10
- 5
- 38
Docker Script For
SinusBot 0.9.18-8499d2c
SinusBot 0.9.18-8499d2c
This requires you have a kernel version 3.10 or newer! Check with this command: uname -r
Credits for my docker scripts goes to Qraktzyl I just rewrote his script to run the newer version.
Original Post: https://r4p3.net/threads/ts3soundboardbot-sinusbot-more-instances-for-ubuntu.1080/
I only tested this on Virtualbox with Ubuntu Server 16.04!
How to install docker?
https://docs.docker.com/engine/installation/linux/ubuntulinux/
Now Lets Start
To start make a user to run docker:Credits for my docker scripts goes to Qraktzyl I just rewrote his script to run the newer version.
Original Post: https://r4p3.net/threads/ts3soundboardbot-sinusbot-more-instances-for-ubuntu.1080/
I only tested this on Virtualbox with Ubuntu Server 16.04!
How to install docker?
https://docs.docker.com/engine/installation/linux/ubuntulinux/
Now Lets Start
adduser tsbot
sudo usermod -aG docker tsbot
Then change to this user:
su tsbot
Create a folder called "docker":
mkdir docker
Go inside that folder. Create a file called "dockerfile" and paste this script inside of it:
cd docker
nano dockerfile
Paste Then Save:
Code:
#Docker unlimited Sinusbot instances
#Version: SinusBot Beta 0.9.16-10f0fad
#Creator: https://www.sinusbot.com/
#Script Made By: Ralph
#Credits Qraktzyl
FROM ubuntu
#VOLUME ["/SinusBot"]
#Prerequisites
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get -y install x11vnc xinit xvfb libxcursor1 ca-certificates bzip2 libglib2.0-0 wget curl python2.7 libssl-dev libffi-dev python-dev
RUN update-ca-certificates
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
#Downloads
RUN mkdir /opt/ts3soundboard/
RUN cd /opt/ts3soundboard/ && wget https://www.sinusbot.com/pre/sinusbot-0.9.18-8499d2c.tar.bz2
RUN cd /opt/ts3soundboard/ && wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.19.4/TeamSpeak3-Client-linux_amd64-3.0.19.4.run
#Setting Up Files
ADD config.ini /opt/ts3soundboard/config.ini
RUN cd /opt/ts3soundboard/ && tar -xjvf sinusbot-0.9.18-8499d2c.tar.bz2
RUN cd /opt/ts3soundboard/ && chmod 0755 TeamSpeak3-Client-linux_amd64-3.0.19.4.run
RUN sed -i 's/^MS_PrintLicense$//' /opt/ts3soundboard/TeamSpeak3-Client-linux_amd64-3.0.19.4.run
RUN cd /opt/ts3soundboard && ./TeamSpeak3-Client-linux_amd64-3.0.19.4.run
RUN cd /opt/ts3soundboard/ && cp plugin/libsoundbot_plugin.so /opt/ts3soundboard/TeamSpeak3-Client-linux_amd64/plugins
RUN chown -R root:root /opt/ts3soundboard
RUN cd /opt/ts3soundboard/ && chmod 755 sinusbot
# Add a startup script
ADD run.sh /run.sh
RUN chmod 755 /*.sh
EXPOSE 8087
CMD ["/run.sh"]
Create a shell script file called "run.sh":
nano run.sh
Paste Then Save:
Code:
#!/bin/bash
rm -rf /tmp/.X*
rm -f /tmp/TS3*
cd /opt/ts3soundboard
./sinusbot -RunningAsRootIsEvilAndIKnowThat
Make it executable:
chmod +x run.sh
Create a Config file called "config.ini":
nano config.ini
Paste Then Save:
Code:
TS3Path = "/opt/ts3soundboard/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/opt/ts3soundboard/data/"
ListenPort = 8087
LogLevel = 10
YoutubeDLPath = "/usr/local/bin/youtube-dl"
EnableDebugConsole = true
We build the image:
docker build -t ts3soundboard095 pathtodockerfile <pathtodockerfile get it do: pwd
Run the first docker container from the image we just created ("ts3soundboard095"):
docker run --restart=always -d --name bot1 -p 8087:8087 ts3soundboard095
You will now be able to access your first ts3soundboard panel by going to http://yourip:8087
To get the panel login information run:
docker logs -f bot1
The name is the part from then docker run command the --name bot1
Scroll up and you will find something like this:
-------------------------------------------------------------------------------
Generating new bot instance with account 'admin' and password 'cok0aU5b'
PLEASE MAKE SURE TO CHANGE THE PASSWORD DIRECTLY AFTER YOUR FIRST LOGIN!!!
-------------------------------------------------------------------------------
Run more docker containers from our "ts3soundboard095" image.
docker run --restart=always -d --name bot2 -p 8088:8087 ts3soundboard095
You will now be able to access your second ts3soundboard panel by going to http://yourip:8088
Change 8088 to 8089 if you want a third container running... Also change the name of the container to bot3. And so on...
docker run --restart=always -d --name bot3 -p 8089:8087 ts3soundboard095
Last edited: