ronancpl / HeavenMS

An improved server based on MapleSolaxia (v83 MapleStory private server)
GNU Affero General Public License v3.0
1.03k stars 742 forks source link

[Cool to Have] Docker Support? #424

Closed Nulliphite closed 5 years ago

Nulliphite commented 5 years ago

Would be awesome and probably reduce the problem with setting up some people might face.

xinyifly commented 5 years ago

I have drafted a Dockerfile in my folk

As simple as:

Dockerfile

FROM openjdk:7-alpine
RUN apk -U add tini
WORKDIR /mnt
COPY ./ ./
RUN sh ./posix-compile.sh
EXPOSE 8484 7575 7576 7577
CMD exec tini -- sh ./configure-launch.sh

configure-launch.sh

#!/bin/bash

sed -i "s/HOST=.*/HOST=${HOST}/" configuration.ini
sed -i "s|URL=.*|URL=${URL}|" configuration.ini
sed -i "s/DB_USER=.*/DB_USER=${DB_USER}/" configuration.ini
sed -i "s/DB_PASS=.*/DB_PASS=${DB_PASS}/" configuration.ini

exec sh ./posix-launch.sh
ronancpl commented 5 years ago

Well, if it is as simple as doing that, I'm already considering it done. Thanks, @xinyifly!