NoxInmortus / docker-maniaplanet

Deprecated mirror of : https://git.spartan.noxinmortus.fr/docker/docker-maniaplanet
MIT License
3 stars 2 forks source link

Pterodactyl egg startup command is static #5

Closed treierxyz closed 3 years ago

treierxyz commented 3 years ago

No matter what I change the startup command to, it doesn't use that command. It's hardcoded in somewhere but I'm not knowledgeable enough with Docker to find where that happens. Any help would be appreciated.

NoxInmortus commented 3 years ago

Hello @treier57lol

Can you paste the changes you made and the logs you get from the container ?

treierxyz commented 3 years ago

OK, I figured out that this is caused by me using my fork of the Docker image and not the original, your version works fine. Thing is that mine is minimally edited, only added these lines (plus a few dependencies) to the Dockerfile (trying to get PyPlanet working):

ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PYENV_ROOT/libexec:$PATH

Also tried an unmodified fork build and the same thing is happening. The install scripts and variables don't affect this issue, only using a forked Docker image build. I don't understand why this would happen.

treierxyz commented 3 years ago

Also thank you for the super quick response.

treierxyz commented 3 years ago

Forked Docker image logs:

=> Going to run on forced IP: 135.181.35.157 and port: 2350
mkdir: can't create directory '/UserData/': Read-only file system
mkdir: can't create directory '/UserData/': Read-only file system
mkdir: can't create directory '/UserData/': Read-only file system
/entrypoint.sh: line 21: can't create /UserData/Config/config.xml: nonexistent directory
cp: can't stat '/matchsettings.xml': No such file or directory
cp: can't stat '/stadium_map.Map.gbx': No such file or directory
=> Downloading newest title version with no TITLE_PACK_FILE variable
MASTERSERVER_ACCOUNT variable should not be empty if it is not a LAN-only server !
=> Starting server, login= with additional parameters :
None
Starting ManiaPlanet Date=2019-10-24_16_00 Svn=97252 GameVersion=3.3.0...
Configuration file : config.txt
Loading system configuration...
...system configuration loaded
Loading cache...
...OK
Loading dedicated server configuration...
...Dedicated server configuration loaded
Connecting to master server...
...OK
Identifying on master server...
...OK
Listening for xml-rpc commands on port 5000.
Match settings file : MatchSettings\matchsettings.txt
Loading match settings...
...Match settings loaded
Autostart server on internet
URL: maniaplanet://#join=treier57lolserveracc@TMStadium@nadeo
Starting server...

Loading map stadium_map.Map.gbx (zZXNqGdTCYXWBFQ5K4RVCqqUQpc)...
...Load succeeds
Script 'Mode:TimeAttack': [LOG]1> [Log] Logs are disabled in the "production" environment.

Starting Match...
...Synchronization
...Play

"Official" Docker image logs:

:/home/container$ ./start.sh
This was printed by an echo command, indicating that the game was launched through ./start.sh
Starting ManiaPlanet Date=2019-10-24_16_00 Svn=97252 GameVersion=3.3.0...
Configuration file : config.txt
Loading system configuration...
...system configuration loaded
Loading cache...
...OK
Loading dedicated server configuration...
...Dedicated server configuration loaded
Connecting to master server...
...OK
Identifying on master server...
...OK
Listening for xml-rpc commands on port 5000.
Match settings file : MatchSettings\matchsettings.txt
Loading match settings...
...Match settings loaded
Autostart server on internet
URL: maniaplanet://#join=treier57lolserveracc@TMStadium@nadeo
Starting server...

Loading map stadium_map.Map.gbx (zZXNqGdTCYXWBFQ5K4RVCqqUQpc)...
...Load succeeds
Script 'Mode:TimeAttack': [LOG]1> [Log] Logs are disabled in the "production" environment.

Starting Match...
...Synchronization
...Play
NoxInmortus commented 3 years ago

Hello again @treier57lol

first of all, what exactly are you trying to do ? In other words, is there something not currently working on the image ?

Also can you give a display of your not-working docker container parameters in a docker-compose way ? Having the env vars may help me eventually

Pterodactyl inner working is a mess to understand, and my memories are not that fresh

N.B: Your logs mentionned your public ipv4, you should better remove it

treierxyz commented 3 years ago

I want to add PyPlanet to the egg, but for that I need a few extra dependencies in the image (for example pyenv won't run without bash so it needs to be included in the image) and to add PATH variables so PyPlanet can be run anywhere. Problem is that I can't fork your original Dockerfile on GitHub and get a working image through Docker Hub no matter if I modified it or not. I want to modify it, just pointing out that the problem occurs in the building process.

I don't know how to fulfill your second request. Again, I'm not too familiar with Docker, I don't know how to get the parameters of an image. Sorry for my dumb caveman brain.

You image is perfectly fine for a standalone server, but I do have some modifications to the egg that fixes a few issues (for example the server username not being written to the config file). Can I just make a pull request here? I understand that your main repository is on GitLab, so maybe there instead?

And finally, the IP is fine. It is a public VPS, not my home network. Editing wouldn't help anyway as you can look at the edit history.

NoxInmortus commented 3 years ago

I took some time to test and review both the classic image and the pterodactyl. I found some issues that I fixed on branch fix-1.1, the gitlab pipeline is currently running to re-build the images. You may want to test the latest version in one hour.

I did not encounter the bug you mentionned about server username tho

If you are still unsuccessful at what you're trying to do with the latest version, make a PR here on Github, I will help me understand what you're trying to achieve and we will see what can we do about it

EDIT : You may want to fetch the latest egg-trackmania.json and import it again

treierxyz commented 3 years ago

The username bug still exists (it's kind of random if it happens) and at least one more in the install script plus a few improvements, I made a PR detailing the changes that fixes those issues (#6). I will also try to make a draft of the Maniaplanet+PyPlanet version and probably continue from there.

treierxyz commented 3 years ago

I finally found out what went wrong. My Pterodactyl Docker image gets built with the entrypoint.sh from the repositories ROOT, not the one in the pterodactyl folder, but I don't understand why. The Dockerfile states to copy ./entrypoint.sh which seems to be parsed correctly by your GitLab pipeline but not by my GitHub integration with Docker Hub. Tried stuff like /pterodactyl/entrypoint.sh and ./pterodactyl/entrypoint.sh but those aren't valid.

treierxyz commented 3 years ago

OK, I got the image to build correctly! I had not set the build context properly 😆. Kind of my bad. Now I should be able to move on with adding PyPlanet. I think this issue can be closed. I will still make a draft PR if you're interested in adding the PyPlanet version to this repo.