So, I am trying to create a docker for MineOS-Node. I want to use this on an unRaid server. I have been using hernandito’s docker in conjunction with successfully for about 4 months or so. The problem i have with it is that it uses the python version of MineOS and I would like to upgrade to the Node version to get the newer features. I tried to just tweak his to get it to upgrade, but the problem is I cant get it to compile. I tried just going into the docker after it starts and upgrading the WebUI that way, but it just makes my web UI stop responding.
So, what I have done is try to create my own. I finally have a dockerfile that will compile on it’s own, but when I run it, it just starts mineOS and quits and I can’t access the webUI.
Here is my dockerfile. Any help or suggestions would be greatly appreciated. I’m guessing I am going to have to add some more scripts of some sort, but am lost at this point.
FROM ubuntu:trusty
MAINTAINER erg.cgs@gmail.com
#These commands are taken straight from http://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS-node_(apt-get)
RUN apt-get -y install curl
RUN curl -L https://deb.nodesource.com/setup_5.x | bash -
RUN apt-get update
RUN apt-get -y install nodejs
#RUN apt-get -y install npm
RUN apt-get -y install git
RUN apt-get -y install rdiff-backup
RUN apt-get -y install screen
RUN apt-get -y install build-essential
RUN apt-get -y install openjdk-7-jre-headless
RUN apt-get -y install rsync
RUN mkdir -p /usr/games
WORKDIR /usr/games
RUN git clone https://github.com/hexparrot/mineos-node.git minecraft
WORKDIR /usr/games/minecraft
RUN git config core.filemode false
RUN chmod +x service.js
RUN chmod +x mineos_console.js
RUN chmod +x generate-sslcert.sh
RUN chmod +x webui.js
RUN npm install
RUN ln -s /usr/games/minecraft/mineos_console.js /usr/local/bin/mineos
RUN cp mineos.conf /etc/mineos.conf
RUN cp /usr/games/minecraft/init/upstart_conf /etc/init/mineos.conf
RUN ./generate-sslcert.sh
# Cleaning
RUN apt-get clean
VOLUME /var/games/minecraft
WORKDIR /usr/games/minecraft
EXPOSE 22 8443 25565
ENTRYPOINT "start mineos"
Well I’m guessing it’s firewall related or the web UI is not running. I’m pretty much a docker noob.
A few things first off can you access the docker server with SSH?
Have you tried examining the the docker file Python of the version to see if there’s anything that might help you?
Try adding RUN start mineos after EXPOSE 22 8443 25565 for testing purposes.
An improvement on your script would be
1. RUN apt-get -y install openjdk-8-jre-headless
Mainly because Java 8 bring some performance enhancements server and client side.
Depending if you can create an optional part of your script I would add Mysql and user password set up. It would make your script it would make your script a hit for other people that use database plug-ins.
These are just my thoughts and mere suggestions I hope you get it figured out some.
Last but not least I’m curious to know depending on the players you have on the server if there’s any performance penalty that you can quantify because of the virtualization.
I don’t think it is a firewall issue as unRaid doesn’t have one built in and I have never put one on. I use a separate firewall and keep the unRaid box off of the internet.
As far as accessing it via SSH, no. When I start the docker it runs the command “start mineos” (thats what ENTRYPOINT does) and then immediately terminates.
Any time I try to install java 8 it comes back with unable to locate package. I will get to that after I get things working.
I have no issues putting Mysql and user passwords but again, I want to get the basic stuff working before going too far.
If you look at hernandito’s git repository he has some other files in there and some other commands. He has a “mineos.conf” that looks customized from the default, and he has a “start.sh” script which is what his docker is set to run on startup.
Finally, as far as the performance, I haven’t noticed anything as this is just a local server for me and the kids to play on. We have at most 4 people running at any one time, typically 2. I started down this road because we were playing vanilla MC1.8 and I thought Feed The Beast looked cool. So I tried to install it, but with the older style webUI it was a pita to get working. After much frustration and hair pulling I saw the youtube video of the new features in the web ui and it looked much better. Now I want to get that working.
You’re right looking it up unRaid doesn’t come with firewall. Although the only two points of failure I can think of is one the web UI and somehow the connection into the docker container.
I would suggest enabling SSH for testing purposes. That way you could check if the web UI is running and if you can connect from your internal network into the docker container. As for the command to check at the web UI is running we have to talk to Will about that.
This might help you in set up java 8 when you get everything else working as it sounds like the repository doesn’t contain a package.
Webup8 Oracle Java8 Installer
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
To automatically set up the Java 8 environment variables
sudo apt-get install oracle-java8-set-default
Check it
java -version
This also can be used update OpenJDK 8 via sudo apt-get install oracle-java8-installer it will clean up the old install.
Something I haven’t been able to figure out with Docker is how to start Containers automatically when the server boots up. There’s a lot of old Docker documentation out there. If you have the know-how could you post a an example?
One thing that I found frustrating about Docker is the lack of a web UI. I found DockerUI to be helpful with managing the very basics.
You’re absolutely right that is the python version I was glancing through originally and saw 8443 which usually is associated with the node version. The python version is usually 8080. I should’ve looked closer at the commands.