Jump to content

rathena-docker


cdelorme

Recommended Posts


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   6
  • Joined:  03/22/16
  • Last Seen:  

I began writing a modular docker implementation of rAthena.

 

Here is the source

 

Currently it only supports the initial layers, I am working on creating a finished full-image and a deployment script to run the stack.

 

Afterwards I hope to create individual images for each component, and add logic to the deployment script that allows a distributed local deployment for testing and demonstration.

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   7
  • Joined:  05/12/12
  • Last Seen:  

Thank you for your contribution! Hope to see more project from you.  /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   6
  • Joined:  03/22/16
  • Last Seen:  

@MrDracula, glad you like it and I hope to do more too.

 

Just finished the `full` image with 1:1 port mapping and tested locally.  I have included a bare-bones `deploy.sh` in the root that should build all three images then deploy the container with the direct mapping (minus exposing the mysql database mostly due to potential port conflicts).

 

I hope to spend time tomorrow fixing things:

 

- update Dockerfile `CMD` to execute parameterized template on `docker create`

- reduce footprint by making the initial image smaller (no build or build tools, just clone)

- remove expose from Dockerfile for mysql/full and set at create time

- enhancing the deployment script to interactively ask for inputs and deal with confligs

 

The way it works currently is that configuration files are modified prior to `docker build`, which means the image created cannot be re-used (which was the original goal).

 

I have notes about the efficiency, and while originally it was for consistency across builds, that same consistency is preventing reusability.  I think I can solve it by leveraging the first step during the final images.  I am pretty sure a smaller final diff is better for creating multiple instances without taking up disk space so I'd almost rather have the build tools in an image prior to each deployable component.  I may toy with some ways to make this more efficient or even reduce the number of planned Dockerfiles.

 

Setting expose in the Dockerfile may not be a great idea, since we can't ensure the external mapping and may have to adjust at least the rathena service configuration during `docker create`.  I am also on the fence about exposing mysql for the full container, but if anyone feels that they want phpmyadmin access I can probably add support for mapping.

 

Finally, I want to make the `deploy.sh` ask for inputs, and deal with things like conflicting ports preemptively.  I can't say it'll be a perfect solution, but it's a step forward.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   6
  • Joined:  03/22/16
  • Last Seen:  

Cleaned up the implementation.  It is now a single dockerfile, and the deployment script handles configuration.  Changes to ports will require modifying the configuration files as well as deploy.sh.  I could enhance but after a few days worth of constant docker blockers I've lost interest in moving this forward for the distributed model.  Turns out docker is very strict about it's single-process per container model.  Somehow CMD in Dockerfile works fine, but when I try using `docker exec` it zombies the processes.  Three days worth of reading says nobody has managed to solve this problem sanely.

 

So, this project is "done", at least as far as my efforts to make it work with docker.  I may post again when I figure out a better way to test distributed rathena builds.

  • Upvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...