Cstolworthy Posted August 23, 2017 Share Posted August 23, 2017 I am hoping what I need already exists, if not, I am willing to try building it. But I figured it would be better to ask here first. I am looking for a docker that simply runs Java, you supply it a command via the variables and it executes that at startup. Specifically I am trying to setup running a minecraft mod server in a docker container. But it would be super nice to have java in the docker, and everything else is mapped. That way I can supply a command like "-Xmx2048M -Xms2048M -jar bin/pw/prok/KCauldron/1.7.10-1614.201/KCauldron-1.7.10-1614.201.jar nogui" and don't have to make a docker specific to the mod I want to run. Quote Link to comment
Squid Posted August 24, 2017 Share Posted August 24, 2017 There are Java and OpenJDK available on dockerHub. Enable Docker Hub searches via Community Application's general settings and then search for it. Quote Link to comment
Cstolworthy Posted August 25, 2017 Author Share Posted August 25, 2017 Please excuse my ignorance here. I found and installed the OpenJDK docker via community applications like you recommended. When I try to start it, it immediately exits. Is that docker meant to be built upon, not run necessarily? If so, do you have any recommendations for articles that go over the basics of building a docker image? Thanks for all the help! Quote Link to comment
Squid Posted August 26, 2017 Share Posted August 26, 2017 IDK That's where you have to read the instructions on dockerHub for the container, make sure you're mapping the correct ports / paths, etc. Quote Link to comment
Cstolworthy Posted August 26, 2017 Author Share Posted August 26, 2017 I got it working with the OpenJDK docker. In case someone else has the same question here is what I did: I went into the options for Community Applications and enabled the ability to search the docker repositories. I then searched for "OpenJDK" and selected the official OpenJDK docker. In the configuration screen for the container I did the following: I added a path that points to the root of where I have my java assets. and named it /minecraft within the container. I then altered the Repository field to the following (without quotes) "-w /minecraft openjdk:8 java -Xmx4096M -Xms2048M -jar /minecraft/bin/pw/prok/KCauldron/1.7.10-1614.201/KCauldron-1.7.10-1614.201.jar nogui" After that it was a matter of mapping the ports I needed. This is probably NOT the correct way to do it, if someone has a better way please let me know. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.