Loading...
  OR  Zero-K Name:    Password:   

Trying to run Zero-K in a Docker container

15 posts, 1085 views
Post comment
Filter:    Player:  
sort
7 years ago
I've never had much luck getting Zero-K to run in Fedora, so I thought I'd try a docker container. It crashes and seems to be looking for a Steam install:

[lunariel@morpheus zero-k-docker]$ sudo ./run.sh
[sudo] password for lunariel:
access control disabled, clients can connect from any host
Chobby.exe Information: 0 : Checking for self-upgrade
Chobby.exe Information: 0 : Querying default engine
Chobby.exe Information: 0 : Reseting configs and deploying AIs
Chobby.exe Information: 0 : Connecting to steam API
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
Chobby.exe Information: 0 : Starting
Chobby.exe Warning: 0 : Spring exit code is: 127, assuming crash
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.

But I don't see Zero-K in the Steam store, so why would it need Steam?
+0 / -0

7 years ago
Zero-K is on steam beta tester only
+0 / -0

7 years ago
You shouldn't need (or use) a docker container. Please just run it directly.
+1 / -0

7 years ago
This is a useful exercise. I want to figure out how to run Zero-K on a hardened system so I can put it in a public arcade type device.

The problem with Zero-K and other video games is that they like to call out to other services because they are applications and not services themselves, so that makes them poor candidates for dockerization with is single process containerization by default. I never had the Steam check cause a crash for me, but what has caused a crash for me was the lack of curl which actually needs to be added as a dependency on the Linux setup page. Without curl, the core spring won't download things because it uses curl.

Do you have the Docker log USrankDensaugeo?
+0 / -0
7 years ago
Yes, just share the docker build file so that we can have a look, doubt that steam is causing the crash.

Do you already use nvidia-docker (https://github.com/NVIDIA/nvidia-docker/wiki) ? (otherwise I think graphics card is not seen in docker)
+0 / -0
7 years ago
I'll run it again and post everything when I get back from work.

It complained about a missing .so file, so I wondered if maybe the linux version was using some library provided by Steam?

In any case, Docker containers don't have to be single-process - that's just recommended because it's convenient when running web services. I've played RuneScape out of a docker container for a while (https://github.com/Densaugeo/runescape-docker), and found it to be much more convenient than trying to get Ubuntu packages to install in Fedora.
+0 / -0
Docker file, build script, and run command are at https://github.com/Densaugeo/zero-k-docker.

The basic setup is install mono etc. in Ubuntu 16.04, and pass in a volume for the Zero-K folder. Zero-K downloads itself fine, but when it tries to start I get the steam error shown in the first post.
+1 / -0
why docker container? Just make different user accounts and gksu.. there are no real defending mechanics over it to have a need to run it in difference environments... just change your username
+0 / -0
7 years ago
Because I've never gotten ZK to run playable in Fedora. A docker container would fix the portability headaches.
+0 / -0

7 years ago
I would like to see your graphics on a docker container...
docker containers are made for HA-clusters not for playing anything graphical on it
+0 / -0

7 years ago
if you really want to do the pain.. run qemu, even with vga-settings you can join ZeroK-
Graphics passthrough is kind of easy if you do not share the same pci bus and have a motherboard default graphicscard... (graphics card and genereal pci..) if it is same pci-bus you have to try around which could lead to kernel crashes :)
+0 / -0
7 years ago
GUIs work fine in docker containers (see the RuneScape docker I linked earlier). And docker containers don't require multiple GPUs or a special motherboard.
+0 / -0

7 years ago
quote:
Because I've never gotten ZK to run playable in Fedora.

Can you please post your exact issues with trying to run it in Fedora?
It should be trivial to run Spring/ZK on any distribution, at most requiring the installation of certain packages.
+0 / -0
Looks like your install script has:
apt-get install -y mono-complete libsdl2-2.0-0 libopenal1

Not sure if that's everything. To be really sure, you can try:
apt-get install -y mono-complete spring

Which will install system-wide spring on the container as well (which we won't use, but it will definitely pull everything Spring needs to run).

Another different approach to run on Fedora is to download latest spring (the first 7z file here):
https://springrts.com/dl/buildbot/default/develop/103.0.1-1244-g70d14a0/linux64/
and extract, then cd to that folder and run ./spring
If that does not work, then it will complain right then and there, and you can see which libs you need to install. If basic Spring does not work, Chobby / Zero-K will not work either.
+0 / -0
Doesn't Fedora use rpm? And the package names are probably different, too.

If Fedora's repository has any prior version of Spring, you should be able to obtain most dependencies with yum-builddep.

The things that are likely to be missing after that are SDL2 and mono. The mono package in centos/fedora/rhel seems to be called "mono-devel", and may require adding an extra repository.

Most importantly, give logs.
+0 / -0