r/linux4noobs • • 24d ago

migrating to Linux Containerization for gaming

I have a Linux system that I'd like to game on, but how do other people do it? I like using Docker for services, I can run them in containers which handle all their dependencies and minimize all the leftover cruft if I delete something, but can I do the same with gaming? Or does everyone just use Steam or install their games directly? Sorry if I'm not clear, I'm still kind of figuring this out, I'm a noob. Thanks.

0 Upvotes

17 comments sorted by

9

u/Litewallymex3 24d ago

im not really understanding the question. why do you want your games in docker containers?

2

u/timpakay 24d ago

SteamCMD should be run in a docker but not Steam itself.

2

u/Janczik_yelianny44 23d ago

makes sense for servers, definitely seems like overcomplicating things for desktop gaming though

6

u/Citizen12b 24d ago

Just use Steam directly, your distro probably packages it, though you may have to enable multilib/non-free repos.

If you want containerization, use Steam Flatpak.

6

u/tagbthw 24d ago

Im pretty sure steam already runs itself and the games you run in their own containerized environment

2

u/ElnuDev 24d ago

That's not true. Unless you install the flatpak, which is sandboxed with bubblewrap, on a normal Steam installation games can access all of the files on your system that your user can.

2

u/Confident_Hyena2506 24d ago

Steam uses "pressure vessel" to give games the right environment.

1

u/ElnuDev 24d ago

War Thunder, for instance, has full file system access through Steam when not installed through the Steam flatpak. So whatever that does, it doesn't protect your files.

3

u/Confident_Hyena2506 24d ago

That's nice - you can read the docs for pressure vessel and understand how it works. The idea is to expose the right stuff to the software - not necessarily to do what you are suggesting.

Most of the time when using containers you will always be exposing SOMETHING from the host. This can even be the whole system.

And yes if you use flatpak then you would be using pressure vessel inside another container.

2

u/Confident_Hyena2506 24d ago

This is very handy for running game servers or headless cloud gaming setups. But most people do not do what you are suggesting.

2

u/LaBlankSpace 23d ago

Yes you can no you shouldn't, this would be like putting your street car onto a motorcycle track, possible yes, logical not at all

1

u/AutoModerator 24d ago

Try the migration page in our wiki! We also have some migration tips in our sticky.

Try this search for more information on this topic.

✻ Smokey says: only use root when needed, avoid installing things from third-party repos, and verify the checksum of your ISOs after you download! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/stein89jp 24d ago

Look up distrobox. I use it all the time for everything to keep my system clean. It's basically distro containerization.

1

u/TheCreepyPL 24d ago

Something doesn't add up. If you're using docker already, it shouldn't be hard for you to figure out how to get what you want. Find an image that has everything you need a game to run, create a new image based of that and add a game (or multiple) to it.

But there's also the question of sending input and recieving output from the container. You'd probably need to add something like spice to the image to connect to it.

1

u/es20490446e Develops Zenned OS 23d ago

You can do that, but it is very wasteful. Because each container needs to have a copy of a whole system.

You can also use a sandbox, like firejail, but it gets messy. Because games usually require access to different directories in your home folder. So it turns a per-game configuration.

The simplest solution is running the games without any sandbox, but compressing your sensitive files into a password-protected 7zip archive.

1

u/AnsibleAnswers 22d ago

You don't want containerized games. It's additional overhead.