the remake
This commit is contained in:
parent
25038162ed
commit
dfa277ca08
62
DEBUGGING.md
62
DEBUGGING.md
@ -58,10 +58,68 @@ The real error was:
|
|||||||
open("/usr/lib/i386-linux-gnu/libgcrypt.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
|
open("/usr/lib/i386-linux-gnu/libgcrypt.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Find missing libs:
|
||||||
|
|
||||||
```
|
```
|
||||||
STEAMLIBS=$(find . -type f -name "*.so" -printf "%f\n" |sort -n |uniq)
|
STEAMLIBS=$(find . -type f -name "*.so" -printf "%f\n" |sort -n |uniq)
|
||||||
find . -type f -name "*.so" -exec ldd '{}' \; |grep 'not found' |sort -n |uniq -c |grep -Ev "echo $STEAMLIBS |tr ' ' '|'"
|
LD_PRELOAD=/lib/x86_64-linux-gnu/libtinfo.so.5 LD_LIBRARY_PATH="$PWD/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu:$PWD/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu:$PWD/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu:$PWD/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu" find . -type f -name "*.so" -exec ldd '{}' \; |grep 'not found' |sort -n |uniq -c |grep -Ev "echo $STEAMLIBS |tr ' ' '|'"
|
||||||
find . -type f -name "*.so" |xargs -I@ sh -c "ldd '@' | grep -q 'libSteamValidateUserIDTickets_amd64' && echo '@'"
|
|
||||||
|
echo "$LIST" | while read LIB; do echo "Looking for ${LIB} ..."; find /usr/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu -xdev -type f -name "${LIB}*" -print -quit; done
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
LD_LIBRARY_PATH="$PWD/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu:$PWD/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu" find . -type f -name "*.so" |xargs -I@ sh -c "ldd '@' | grep -q 'libSteamValidateUserIDTickets_amd64' && echo '@'"
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
$ LD_DEBUG=help cat
|
||||||
|
$ LD_DEBUG=files STEAM_DEBUG=1 LD_PRELOAD=$LD_PRELOAD steam |& grep -v 'wrong ELF class'
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
STEAM_DEBUG=1
|
||||||
|
STEAM_RUNTIME_PREFER_HOST_LIBRARIES=1
|
||||||
|
STEAM_RUNTIME=1
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
cat /home/user/.local/share/Steam/steamdeps.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
steam --reset
|
||||||
|
```
|
||||||
|
|
||||||
|
> ``AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"``
|
||||||
|
|
||||||
|
```
|
||||||
|
# apt -y install pulseaudio-utils alsa-utils
|
||||||
|
root@steam:/# su -l user -c "paplay /usr/share/sounds/alsa/Front_Right.wav"
|
||||||
|
root@steam:/# OK
|
||||||
|
|
||||||
|
root@steam:/# su -l user -c "aplay /usr/share/sounds/alsa/Front_Right.wav"
|
||||||
|
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
|
||||||
|
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
|
||||||
|
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
|
||||||
|
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
|
||||||
|
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
|
||||||
|
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
|
||||||
|
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
|
||||||
|
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
|
||||||
|
aplay: main:788: audio open error: No such file or directory
|
||||||
|
|
||||||
|
root@steam:/# apt-get install libasound2-plugins
|
||||||
|
root@steam:/# su -l user -c "aplay -L"
|
||||||
|
null
|
||||||
|
Discard all samples (playback) or generate zero samples (capture)
|
||||||
|
pulse
|
||||||
|
PulseAudio Sound Server
|
||||||
|
|
||||||
|
root@steam:/# su -l user -c "aplay -D pulse /usr/share/sounds/alsa/Front_Right.wav"
|
||||||
|
Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
|
||||||
|
|
||||||
|
root@steam:/# su -l user -c "pactl list cards short"
|
||||||
|
root@steam:/# su -l user -c "pactl list sinks short"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
122
Dockerfile
122
Dockerfile
@ -1,103 +1,49 @@
|
|||||||
FROM debian:jessie
|
FROM ubuntu:bionic
|
||||||
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
|
||||||
|
|
||||||
# To avoid problems with Dialog and curses wizards
|
# To avoid problems with Dialog and curses wizards
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
# 1. Keep the image updated
|
|
||||||
# 2. Install the dependencies
|
|
||||||
# 3. Install the latest version of Steam
|
|
||||||
# http://repo.steampowered.com/steam
|
|
||||||
RUN echo "deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam" > /etc/apt/sources.list.d/tmp-steam.list
|
|
||||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0xF24AEA9FB05498B7
|
|
||||||
RUN dpkg --add-architecture i386
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get -y upgrade
|
|
||||||
RUN apt-get -y dist-upgrade
|
|
||||||
RUN apt-get -fy install
|
|
||||||
RUN apt-get -y install binutils pciutils pulseaudio libcanberra-gtk-module \
|
|
||||||
libopenal1 libnss3 libgconf-2-4 libxss1 libnm-glib4 \
|
|
||||||
libnm-util2 libglu1-mesa locales libsdl2-image-2.0 \
|
|
||||||
steam-launcher \
|
|
||||||
mesa-utils:i386 \
|
|
||||||
libstdc++5 libstdc++5:i386 libbz2-1.0:i386 \
|
|
||||||
libavformat56 libswscale3 libavcodec56:i386 \
|
|
||||||
libavformat56:i386 libavresample2:i386 libavutil54:i386 \
|
|
||||||
libswscale3:i386 libsdl2-2.0-0 libsdl2-2.0-0:i386 \
|
|
||||||
libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386 \
|
|
||||||
libxtst6:i386 libxrandr2:i386 libglib2.0-0:i386 \
|
|
||||||
libgtk2.0-0:i386 libgdk-pixbuf2.0-0:i386 libsm6:i386 \
|
|
||||||
libice6:i386 libopenal1:i386 libdbus-glib-1-2:i386 \
|
|
||||||
libnm-glib4:i386 libnm-util2:i386 libusb-1.0-0:i386 \
|
|
||||||
libnss3:i386 libgconf-2-4:i386 libxss1:i386 libcurl3:i386 \
|
|
||||||
libv8-dev:i386 \
|
|
||||||
libcanberra-gtk-module:i386 libpulse0:i386 attr \
|
|
||||||
libva-x11-1:amd64 libva-x11-1:i386 && \
|
|
||||||
rm -f /etc/apt/sources.list.d/tmp-steam.list && \
|
|
||||||
rm -rf /var/lib/apt/lists
|
|
||||||
|
|
||||||
# Not sure whether we really need these:
|
|
||||||
# libcurl3 libcanberra-gtk-module
|
|
||||||
|
|
||||||
# Workaround missing lib in .local/share/Steam/ubuntu12_32/steamclient.so
|
|
||||||
RUN ln -sv libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
|
|
||||||
|
|
||||||
# Add missing symlink to make some games work (e.g. "Alien: Isolation")
|
|
||||||
RUN ln -sv librtmp.so.1 /usr/lib/x86_64-linux-gnu/librtmp.so.0 && \
|
|
||||||
ln -sv librtmp.so.1 /usr/lib/i386-linux-gnu/librtmp.so.0
|
|
||||||
|
|
||||||
# Workaround: Ubuntu 16.04 doesn't have libgcrypt11 nor libjson-c3, so we take
|
|
||||||
# them from trusty
|
|
||||||
# libcryptot11 is required by Half-Life based games
|
|
||||||
# TODO: use debian mirrors if possible?
|
|
||||||
ADD http://archive.ubuntu.com/ubuntu/pool/main/libg/libgcrypt11/libgcrypt11_1.5.3-2ubuntu4_i386.deb /tmp/libgcrypt11_i386.deb
|
|
||||||
ADD http://archive.ubuntu.com/ubuntu/pool/main/libg/libgcrypt11/libgcrypt11_1.5.3-2ubuntu4_amd64.deb /tmp/libgcrypt11_amd64.deb
|
|
||||||
ADD http://ftp.de.debian.org/debian/pool/main/j/json-c/libjson-c3_0.12.1-1.1_amd64.deb /tmp/libjson-c3_amd64.deb
|
|
||||||
RUN cd /tmp && \
|
|
||||||
dpkg -i *.deb && \
|
|
||||||
rm -f *.deb
|
|
||||||
|
|
||||||
# Workaround2: Steam severely floods DNS requests on Linux, so let's use a DNS cache
|
|
||||||
# (see https://github.com/ValveSoftware/steam-for-linux/issues/3401)
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y install dnsmasq
|
apt-get -y install gnupg
|
||||||
|
|
||||||
|
# Install Steam
|
||||||
|
RUN echo "deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam" | tee /etc/apt/sources.list.d/tmp-steam.list && \
|
||||||
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0xF24AEA9FB05498B7 && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get -y install steam-launcher && \
|
||||||
|
rm -vf /etc/apt/sources.list.d/tmp-steam.list
|
||||||
|
|
||||||
|
# Install Steam dependencies
|
||||||
|
RUN dpkg --add-architecture i386 && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get -y install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386
|
||||||
|
|
||||||
|
# Steam severely floods DNS requests on Linux, so let's use a DNS cache.
|
||||||
|
# Run docker image with: ``--dns 127.0.0.1`` flag to use the dnsmasq for DNS cache.
|
||||||
|
# https://github.com/ValveSoftware/steam-for-linux/issues/3401
|
||||||
|
RUN apt-get -y install dnsmasq
|
||||||
COPY ./dnsmasq.conf /etc/dnsmasq.conf
|
COPY ./dnsmasq.conf /etc/dnsmasq.conf
|
||||||
COPY ./resolv.conf /etc/resolv.dnsmasq
|
COPY ./resolv.dnsmasq /etc/resolv.dnsmasq
|
||||||
|
|
||||||
# Fix bug https://github.com/arno01/steam/issues/11 where Pulseaudio crashes
|
# Set locale to: en_US.UTF-8
|
||||||
# when microphone is accessed via push-to-talk.
|
RUN apt-get -y install locales && \
|
||||||
RUN echo "enable-shm = no" >> /etc/pulse/client.conf
|
sed -i.orig '/^# en_US.UTF-8.*/s/^#.//g' /etc/locale.gen && \
|
||||||
|
|
||||||
# Get newer MESA to support new GPU (graphic cards)
|
|
||||||
RUN echo "deb http://deb.debian.org/debian jessie-backports main" | tee -a /etc/apt/sources.list
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get -y -t jessie-backports install libegl1-mesa-drivers:amd64 libegl1-mesa-drivers:i386 libgl1-mesa-dri:amd64 libgl1-mesa-dri:i386 libgl1-mesa-glx:amd64 libgl1-mesa-glx:i386 libglapi-mesa:amd64 libglapi-mesa:i386 libegl1-mesa:amd64 libegl1-mesa:i386 libgbm1:amd64 libgbm1:i386 libopenvg1-mesa:amd64 libopenvg1-mesa:i386 libwayland-egl1-mesa:amd64 libwayland-egl1-mesa:i386
|
|
||||||
# Proton/vulkan deps
|
|
||||||
RUN apt-get -y install python3 libvulkan1
|
|
||||||
RUN apt-get -y autoremove
|
|
||||||
|
|
||||||
# locale-gen: Generate locales based on /etc/locale.gen file
|
|
||||||
# update-locale: Generate config /etc/default/locale (later read by /etc/pam.d/su, /etc/pam.d/login, /etc/pam.d/polkit-1)
|
|
||||||
RUN sed -i.orig '/^# en_US.UTF-8.*/s/^#.//g' /etc/locale.gen && \
|
|
||||||
locale-gen && \
|
locale-gen && \
|
||||||
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
ENV LANG en_US.UTF-8
|
# Let ALSA lib talk to Pulseaudio.
|
||||||
ENV LC_ALL en_US.UTF-8
|
# AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
|
||||||
|
# ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
|
||||||
|
RUN apt-get -y install libasound2-plugins libasound2-plugins:i386
|
||||||
|
|
||||||
# Create a user
|
# Fix to: "steam launcher crashes on second run (debian sid in a chroot on debian wheezy) #3501"
|
||||||
ENV USER user
|
# https://github.com/ValveSoftware/steam-for-linux/issues/3501
|
||||||
ENV UID 1000
|
RUN apt-get -y install libnm-glib4:i386 libnm-util2:i386
|
||||||
ENV GROUPS audio,video
|
|
||||||
ENV HOME /home/$USER
|
|
||||||
RUN useradd -m -d $HOME -u $UID -G $GROUPS $USER
|
|
||||||
|
|
||||||
# DEBUGGING
|
# Fix to: "Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element"
|
||||||
#RUN apt-get -y install alsa-utils mesa-utils vim less gdb strace binutils wget
|
# https://github.com/ValveSoftware/steam-for-linux/issues/3307
|
||||||
|
RUN apt-get -y install fontconfig:i386
|
||||||
WORKDIR $HOME
|
|
||||||
|
|
||||||
ENV STEAM_RUNTIME 0
|
|
||||||
|
|
||||||
|
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"
|
||||||
COPY ./launch /launch
|
COPY ./launch /launch
|
||||||
ENTRYPOINT [ "/bin/bash", "/launch" ]
|
ENTRYPOINT [ "/bin/bash", "/launch" ]
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2016, Andrey Arapov
|
Copyright (c) 2016,2017,2018, Andrey Arapov
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
|
93
README.md
93
README.md
@ -1,5 +1,19 @@
|
|||||||
# Steam in Docker
|
# Steam in Docker
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
### Dec 21 2018:
|
||||||
|
|
||||||
|
- got rid of 'wrong ELF class' messages from the logs;
|
||||||
|
- changed the base image ``debian:jessie`` to ``ubuntu:bionic``;
|
||||||
|
- significantly reduced the amount of dependencies as the image is now using
|
||||||
|
the Steam runtime;
|
||||||
|
- added ``SYS_PTRACE`` cap so Proton can show additional process traces;
|
||||||
|
- removed grsecurity support since they have [stopped](https://lwn.net/Articles/720983/) giving us the test patches;
|
||||||
|
- simplified the ``LD_LIBRARY_PATH`` routine in the launcher;
|
||||||
|
- users can now control the ``USER_ID`` via the environment variable;
|
||||||
|
- removed the old drivers support, let me know if you want it back;
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
|
|
||||||
1. I want to set-up more fences when running the code I cannot always trust nor verify; [issue 3671](https://github.com/valvesoftware/steam-for-linux/issues/3671)
|
1. I want to set-up more fences when running the code I cannot always trust nor verify; [issue 3671](https://github.com/valvesoftware/steam-for-linux/issues/3671)
|
||||||
@ -13,33 +27,23 @@
|
|||||||
|
|
||||||
Games:
|
Games:
|
||||||
|
|
||||||
|
- Counter-Strike 1.6
|
||||||
- Counter-Strike: Global Offensive
|
- Counter-Strike: Global Offensive
|
||||||
- Alien: Isolation
|
- Call of Duty 4: Modern Warfare
|
||||||
- PAYDAY 2
|
- Delta Force (NovaLogic)
|
||||||
- Insurgency
|
|
||||||
- Half-Life: Counter-Strike 1.6
|
|
||||||
- Iron Snout
|
|
||||||
- Toribash
|
|
||||||
- DeadCore (no sound)
|
|
||||||
|
|
||||||
OS:
|
OS:
|
||||||
|
|
||||||
- Linux: Ubuntu 16.04 LTS (64-bit)
|
- Linux: Ubuntu 18.04.1 LTS (64-bit)
|
||||||
- Linux: openSUSE Leap 42.1 (64-bit)
|
|
||||||
|
|
||||||
HW:
|
HW:
|
||||||
|
|
||||||
- Sony Vaio Pro 13
|
|
||||||
- Lenovo X1 Carbon
|
|
||||||
- ASUS P8Z68-V PRO/GEN3
|
- ASUS P8Z68-V PRO/GEN3
|
||||||
- Apple MacBook Pro "Core i7" 2.9 15" Touch/Mid-2017
|
|
||||||
|
|
||||||
GPU:
|
GPU:
|
||||||
|
|
||||||
- Intel HD Graphics 3000
|
- Intel HD Graphics 3000
|
||||||
- Intel HD Graphics 4400
|
- NVIDIA's GeForce GTX 1060
|
||||||
- NVIDIA's GeForce GTX 560 Ti
|
|
||||||
- AMD Radeon Pro 560
|
|
||||||
|
|
||||||
> For running games on AMD Radeon please uncomment ``/dev/kfd`` device in the docker-compose.yml file.
|
> For running games on AMD Radeon please uncomment ``/dev/kfd`` device in the docker-compose.yml file.
|
||||||
|
|
||||||
@ -52,12 +56,10 @@ GPU:
|
|||||||
|
|
||||||
## Launching Steam in Docker
|
## Launching Steam in Docker
|
||||||
|
|
||||||
The simplest way to launch Steam is this:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/arno01/steam.git
|
git clone https://git.nixaid.com/arno/steam.git
|
||||||
cd steam
|
cd steam
|
||||||
docker-compose run steam
|
docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
If Steam does not start, you may need to allow your user making connections to
|
If Steam does not start, you may need to allow your user making connections to
|
||||||
@ -67,36 +69,10 @@ your X server:
|
|||||||
xhost +SI:localuser:$(id -un)
|
xhost +SI:localuser:$(id -un)
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use the following shortcut function and place it to your `~/.bash_aliases` file:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
function docker_helper() {
|
|
||||||
pushd ~/github.com/$1
|
|
||||||
docker-compose rm -fa "$1"
|
|
||||||
docker-compose run -d --name "$1" "$@"
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
function steam() {
|
|
||||||
docker_helper "$FUNCNAME" "$@"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Then just use ``steam`` command to run Steam image.
|
|
||||||
|
|
||||||
## Updating image
|
|
||||||
|
|
||||||
Re-run this command later on in order to keep the image updated:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd steam/
|
|
||||||
git pull
|
|
||||||
VERSION=$(git rev-parse HEAD | head -c8) make
|
|
||||||
```
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
You might want to modify the `docker-compose.yml` in case of problems, the file should be pretty self explanatory, although you may refer to the official [Docker Compose file reference](https://docs.docker.com/compose/compose-file/)
|
You might want to modify the `docker-compose.yml` in case of problems,
|
||||||
|
the file should be pretty self explanatory, although you may refer to the official [Docker Compose file reference](https://docs.docker.com/compose/compose-file/)
|
||||||
|
|
||||||
Also keep in mind to uncomment or/and add your devices to the `devices:` section there.
|
Also keep in mind to uncomment or/and add your devices to the `devices:` section there.
|
||||||
|
|
||||||
@ -108,24 +84,13 @@ If you are getting `segmentation fault` error or Steam does not start, then you
|
|||||||
docker-compose run --rm steam --reset
|
docker-compose run --rm steam --reset
|
||||||
```
|
```
|
||||||
|
|
||||||
## Grsecurity notes
|
|
||||||
|
|
||||||
### grsec: TPE
|
|
||||||
|
|
||||||
Trusted Path Execution (TPE)
|
|
||||||
|
|
||||||
This Steam docker image is working with the grsecurity patched kernel.
|
|
||||||
It only needs a `/proc/sys/kernel/grsecurity/tpe_gid` accessible by root for read.
|
|
||||||
|
|
||||||
### grsec: PaX
|
|
||||||
|
|
||||||
It is also working with PaX part of the grsecurity.
|
|
||||||
I have tested it with Half-Life games like CS 1.6, and CS:GO.
|
|
||||||
Please refer to the `launch` file if grsecurity is blocking some executable or a library.
|
|
||||||
|
|
||||||
# Links
|
# Links
|
||||||
|
|
||||||
Below is just bunch of links, someone might find them useful
|
Below is just a bunch of links, someone might find them useful.
|
||||||
|
|
||||||
|
- https://github.com/ValveSoftware/steam-for-linux/issues
|
||||||
|
|
||||||
|
- https://github.com/ValveSoftware/Proton/issues
|
||||||
|
|
||||||
- https://wiki.ubuntu.com/Valve
|
- https://wiki.ubuntu.com/Valve
|
||||||
|
|
||||||
@ -136,5 +101,3 @@ Below is just bunch of links, someone might find them useful
|
|||||||
- http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
|
- http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
|
||||||
|
|
||||||
- http://repo.steamstatic.com/steam/
|
- http://repo.steamstatic.com/steam/
|
||||||
|
|
||||||
- https://grsecurity.net/
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Steam will store its data in this folder:
|
Steam will store its data in this folder:
|
||||||
|
|
||||||
- .steam/ for updates, game downloads & storage.
|
- .steam/ for updates, game downloads & storage;
|
||||||
- .local/share/Steam/ for account configuration.
|
- .local/share/Steam/ for account configuration;
|
||||||
|
@ -1,33 +1,21 @@
|
|||||||
version: '2'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
steam:
|
steam:
|
||||||
image: andrey01/steam
|
init: true
|
||||||
|
hostname: steam
|
||||||
network_mode: bridge
|
network_mode: bridge
|
||||||
volumes:
|
image: andrey01/steam
|
||||||
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
# DNS cache is needed to avoid resolver abuse
|
||||||
- /etc/localtime:/etc/localtime:ro
|
# https://github.com/ValveSoftware/steam-for-linux/issues/3401
|
||||||
- /etc/machine-id:/etc/machine-id:ro
|
dns: 127.0.0.1
|
||||||
- $XDG_RUNTIME_DIR/pulse:/run/user/1000/pulse
|
shm_size: 4G
|
||||||
- ./data:/home/user
|
environment:
|
||||||
# - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
|
- DISPLAY=unix$DISPLAY
|
||||||
# Ubuntu's NVIDIA driver:
|
- PULSE_SERVER=unix:$XDG_RUNTIME_DIR/pulse/native
|
||||||
- /usr/lib/nvidia-361-prime:/h1_64:ro
|
#- DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
|
||||||
- /usr/lib/nvidia-340:/h2_64:ro
|
- USER_ID=1000
|
||||||
- /usr/lib/nvidia-340-prime:/h3_64:ro
|
# - STEAM_RUNTIME=1
|
||||||
- /usr/lib/nvidia-304:/h4_64:ro
|
|
||||||
- /usr/lib32/nvidia-361:/h5_32:ro
|
|
||||||
- /usr/lib32/nvidia-340:/h6_32:ro
|
|
||||||
- /usr/lib32/nvidia-304:/h7_32:ro
|
|
||||||
# # Ubuntu's generic libGL:
|
|
||||||
# - /usr/lib/x86_64-linux-gnu:/h8_64:ro
|
|
||||||
# - /usr/lib/i386-linux-gnu:/h9_32:ro
|
|
||||||
# openSUSE's NVIDIA driver:
|
|
||||||
- /usr/X11R6/lib:/h10_32:ro
|
|
||||||
- /usr/X11R6/lib64:/h11_64:ro
|
|
||||||
- /usr/lib:/h12_32:ro
|
|
||||||
- /usr/lib64:/h13_64:ro
|
|
||||||
dns: steam # a DNS cache is needed to avoid upstream bug https://github.com/ValveSoftware/steam-for-linux/issues/3401
|
|
||||||
devices:
|
devices:
|
||||||
# Common:
|
# Common:
|
||||||
- /dev/dri
|
- /dev/dri
|
||||||
@ -36,14 +24,25 @@ services:
|
|||||||
- /dev/nvidia0
|
- /dev/nvidia0
|
||||||
- /dev/nvidiactl
|
- /dev/nvidiactl
|
||||||
- /dev/nvidia-uvm
|
- /dev/nvidia-uvm
|
||||||
|
- /dev/nvidia-uvm-tools
|
||||||
# NVIDIA driver >= 361:
|
# NVIDIA driver >= 361:
|
||||||
- /dev/nvidia-modeset
|
- /dev/nvidia-modeset
|
||||||
# AMD/ATI Radeon:
|
# AMD/ATI Radeon:
|
||||||
# - /dev/kfd
|
# - /dev/kfd
|
||||||
environment:
|
volumes:
|
||||||
- DISPLAY=unix$DISPLAY
|
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
||||||
- PULSE_SERVER=unix:$XDG_RUNTIME_DIR/pulse/native
|
- /etc/localtime:/etc/localtime:ro
|
||||||
# Use Steam provided runtime, requires --reset
|
- /etc/machine-id:/etc/machine-id:ro
|
||||||
# Steam provided runtime seems to be less stable with this image
|
- $XDG_RUNTIME_DIR/pulse:/run/user/1000/pulse
|
||||||
# - STEAM_RUNTIME=1
|
# - $XDG_RUNTIME_DIR/bus:/run/user/1000/bus
|
||||||
shm_size: 4G
|
- ./data:/home/user
|
||||||
|
# - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
|
||||||
|
# Location to your NVIDIA drivers:
|
||||||
|
- /usr/lib/i386-linux-gnu:/hostlibs/32:ro
|
||||||
|
- /usr/lib/x86_64-linux-gnu:/hostlibs/64:ro
|
||||||
|
# security_opt:
|
||||||
|
# - apparmor=unconfined
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
# - ALL
|
||||||
|
# privileged: true
|
||||||
|
69
launch
69
launch
@ -1,66 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
|
||||||
# Make errors visible upon `docker logs -f steam` command
|
# Make errors visible upon `docker logs -f steam` command
|
||||||
#
|
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
service dnsmasq start
|
service dnsmasq start
|
||||||
|
|
||||||
#
|
id user >/dev/null 2>&1
|
||||||
# Befriend with grsecurity patched Linux kernel
|
[ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user
|
||||||
#
|
|
||||||
# TODO: find a way how to set these attributes dynamically,
|
|
||||||
# since this currently requires a Steam restart
|
|
||||||
# when new content is obtained.
|
|
||||||
if [ -f /proc/sys/kernel/grsecurity/tpe_gid ]; then
|
|
||||||
groupadd -r -g $(cat /proc/sys/kernel/grsecurity/tpe_gid) grsec-tpe
|
|
||||||
usermod -aG grsec-tpe $USER
|
|
||||||
setfattr -n user.pax.flags -v "m" \
|
|
||||||
/lib/i386-linux-gnu/ld-2.19.so \
|
|
||||||
$HOME/.local/share/Steam/ubuntu12_32/steam \
|
|
||||||
$HOME/.local/share/Steam/ubuntu12_32/steamwebhelper \
|
|
||||||
$HOME/.local/share/Steam/ubuntu12_32/gameoverlayui \
|
|
||||||
$HOME/.local/share/Steam/steamapps/common/Half-Life/hl_linux \
|
|
||||||
$HOME/.local/share/Steam/steamapps/common/Counter-Strike\ Global\ Offensive\csgo_linux64
|
|
||||||
# paxctl -c -v -m /lib/i386-linux-gnu/ld-2.19.so
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
# NOTE: This workaround has been obsolete by "apt-get -y install libnm-glib4:i386 libnm-util2:i386".
|
||||||
# Add a user to a detected "video" group
|
# WORKAROUND to "steam launcher crashes on second run (debian sid in a chroot on debian wheezy) #3501"
|
||||||
# so that it can access the nvidia devices
|
# https://github.com/ValveSoftware/steam-for-linux/issues/3501
|
||||||
#
|
# rm -vf ~user/.local/share/Steam/config/config.vdf
|
||||||
if [ -e /dev/nvidiactl ]; then
|
|
||||||
GID=$(stat -c '%g' /dev/nvidiactl)
|
|
||||||
groupadd -r -g $GID nvidia1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
usermod -aG nvidia1 $USER
|
|
||||||
else
|
|
||||||
GROUP=$(stat -c '%G' /dev/nvidiactl)
|
|
||||||
usermod -aG $GROUP $USER
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use libgcrypt provided by the Steam docker image (needed by HL1 engine games)
|
# LD_PRELOAD=$LD_PRELOAD:$(for LIB in ${PRELOAD_LIBS:-libnvidia-glcore.so tls/libnvidia-tls.so libGLX_nvidia.so}; do find /hostlibs -type f -iregex ".*/${LIB}.*" -print0; done | tr '\0' ':' ; echo)
|
||||||
LD_PRELOAD="$LD_PRELOAD:/lib/i386-linux-gnu/libgcrypt.so.11:/lib/x86_64-linux-gnu/libgcrypt.so.11"
|
# su -l user -c "HOME=/home/user STEAM_RUNTIME=${STEAM_RUNTIME:-1} LD_PRELOAD=$LD_PRELOAD steam $@" |& grep -v 'wrong ELF class'
|
||||||
export LD_PRELOAD
|
|
||||||
|
|
||||||
#
|
# LD_PRELOAD does not work well when you want to use Proton (modified version of Wine created by Steam)
|
||||||
# Try to load host's libGL (generic or Nvidia 32/64-bit) drivers
|
# When running the games with Proton, they will fail with:
|
||||||
#
|
# "wine: Unhandled page fault on read access to 0x00000000 at address 0xf5c1c2b6 (thread 0009), starting debugger..."
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(echo /h{1..20}_{32,64} | tr ' ' ':')"
|
# This is due to a mix of our LD_PRELOAD and Proton's. They add ".local/share/Steam/ubuntu12_{32,64}/gameoverlayrenderer.so".
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
#
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64:"
|
||||||
# In order to avoid the inconsistency error, when launching `csgo_linux64`
|
su -l user -c "HOME=/home/user STEAM_RUNTIME=${STEAM_RUNTIME:-1} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} steam $@" |& grep -v 'wrong ELF class'
|
||||||
# Inconsistency detected by ld.so: dl-open.c: 689: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
|
|
||||||
# Hint: to find out what's wrong, use `strace`
|
|
||||||
#
|
|
||||||
# 1) Try to load host's Pulse library instead of the one from this image
|
|
||||||
export LD_PRELOAD="$LD_PRELOAD:$(find /h{1..20}_{32,64} -type f -name "*libpulsecommon*" -print0 2>/dev/null| tr '\0' ':')"
|
|
||||||
|
|
||||||
# BUGFIX: Steam is searching for libfreeblpriv3.so in tls/ directory
|
|
||||||
ln -sv /usr/lib/x86_64-linux-gnu/nss /usr/lib/x86_64-linux-gnu/tls
|
|
||||||
ln -sv /usr/lib/i386-linux-gnu/nss /usr/lib/i386-linux-gnu/tls
|
|
||||||
|
|
||||||
su -p user -c "steam $@"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user