Freeorion server in docker?
Moderator: Oberlus
Freeorion server in docker?
I'm just learning how to use Docker and I thought it would be interesting to see if I could get the freeorion server to run in a docker container. I tried to setup a Dockerfile and docker-compose file but they don't work. I am hoping someone who understands both better than I could help me out.
https://github.com/magnusviri/freeorion-server-docker
I'm running Docker Desktop on a Mac and I'm hoping to connect to it with my Mac. If I could get this to work I could put this anywhere.
James
https://github.com/magnusviri/freeorion-server-docker
I'm running Docker Desktop on a Mac and I'm hoping to connect to it with my Mac. If I could get this to work I could put this anywhere.
James
Re: Freeorion server in docker?
if you want to run the freeorion server this might be good idea. make the necessary ports accessible. add the necessary start command. also learn how to enter a running docker container to have a look what is actually happening.
if you have it running connect from a client to the server.
for running a GUI client, docker is usually a bad choice (especially for someone who just started).
if you have it running connect from a client to the server.
for running a GUI client, docker is usually a bad choice (especially for someone who just started).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Freeorion server in docker?
This would be for the server. I've actually gotten X11 forwarding to work with the Brave Browser but it always crashes. I don't see much advantage to running a GUI in Docker until this type of thing gets official support from Docker and the software vendors.
My port mapping is 12346:12346. Is this correct?
I should've been clearer in my first post. When I install and run freeorion inside of a Ubuntu 20.04 container this is what I get.
root@a2e3f3765915:/# /usr/lib/freeorion/freeoriond
Segmentation fault
I have no idea how to debug this. Do I need to build it from source and then run it in gdb or something? It's been a long time since I've used gdb...
My port mapping is 12346:12346. Is this correct?
I should've been clearer in my first post. When I install and run freeorion inside of a Ubuntu 20.04 container this is what I get.
root@a2e3f3765915:/# /usr/lib/freeorion/freeoriond
Segmentation fault
I have no idea how to debug this. Do I need to build it from source and then run it in gdb or something? It's been a long time since I've used gdb...
Re: Freeorion server in docker?
Hm, I installed freeorion on Lubuntu 20.04 and it crashed too. And then I found out it was 0.4.8. So I installed the snap version, which was 0.4.10.1. Then I checked the version in the Docker container and it was 0.4.8.
So I really need to figure out how to get 0.4.10.1 in a container. I'm trying to get snap working in a Docker container now.
I have a whole new problem though. I'll start a new thread.
So I really need to figure out how to get 0.4.10.1 in a container. I'm trying to get snap working in a Docker container now.
I have a whole new problem though. I'll start a new thread.
Re: Freeorion server in docker?
You could try to install 0.4.10.1 from PPA https://launchpad.net/~o01eg/+archive/u ... ion-stable
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Freeorion server in docker?
That works! But now I get this error:o01eg wrote: ↑Wed Feb 17, 2021 4:37 am You could try to install 0.4.10.1 from PPA https://launchpad.net/~o01eg/+archive/u ... ion-stable
Code: Select all
/usr/lib/freeorion/freeoriond --hostless --network.server.unconn-human-empire-players.max 0 --network.server.conn-human-empire-players.min 0
terminate called without an active exception
Aborted
Anyway, I looked it up and found this.
https://stackoverflow.com/questions/738 ... -exception
I would have no idea what to do about it. I learned C++ in a class 25 years ago but haven't really touched it since. I haven't looked at the FreeOrion code either.
Re: Freeorion server in docker?
Could you get logs from docker? You could use argument --log-file <path> to write log in desired location.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Freeorion server in docker?
I got it to work. Now I can play FreeOrion in the cloud.
I moved it here. https://github.com/magnusviri/dockerfil ... /freeorion
Save Game and Concede are greyed out though. It seems to save anyway? Is that because the first person to join has the option set to save?
Also, it seems like the only way to reload an old game (like, say I get destroyed and want to go back and try again) is to restart the whole thing. Does that sound about right?
I moved it here. https://github.com/magnusviri/dockerfil ... /freeorion
Save Game and Concede are greyed out though. It seems to save anyway? Is that because the first person to join has the option set to save?
Also, it seems like the only way to reload an old game (like, say I get destroyed and want to go back and try again) is to restart the whole thing. Does that sound about right?
Re: Freeorion server in docker?
I fixed it with what I posted on this thread: viewtopic.php?f=2&t=10942&start=135
Re: Freeorion server in docker?
Yes, it saves itself because of hostless options. Any players connected don't become host so they cannot save games.
To manage save you can provide next options to the server:
- --save.auto.hostless.enabled - set to 1 to save each turn
- --save.auto.exit.enabled - set to 1 to save when shutdown freeoriond
- --save.auto.interval - automatically save each seconds
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm