Browse Source

make sure steam can be safely restarted

master
Andrey Arapov 3 years ago
parent
commit
9edf31b5ba
Signed by: arno GPG Key ID: 9076D5E6B31AE99C
  1. 14
      Dockerfile
  2. 22
      launch

14
Dockerfile

@ -25,12 +25,6 @@ RUN apt-get -y install dnsmasq
COPY ./dnsmasq.conf /etc/dnsmasq.conf
COPY ./resolv.dnsmasq /etc/resolv.dnsmasq
# Set locale to: en_US.UTF-8
RUN apt-get -y install locales && \
sed -i.orig '/^# en_US.UTF-8.*/s/^#.//g' /etc/locale.gen && \
locale-gen && \
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
# Let ALSA lib talk to Pulseaudio.
# AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
# ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
@ -47,6 +41,14 @@ RUN apt-get -y install fontconfig:i386
# Enable Vulkan library.
RUN apt-get -y install libvulkan1 libvulkan1:i386 vulkan-utils
RUN apt-get -y install gosu
# Set locale to: en_US.UTF-8
RUN apt-get -y install locales && \
/bin/echo -e "en_US.UTF-8 UTF-8\nen_GB.UTF-8 UTF-8" | tee /etc/locale.gen && \
locale-gen && \
update-locale LANG=en_US.UTF-8 LC_ALL=en_GB.UTF-8
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"
COPY ./launch /launch
ENTRYPOINT [ "/bin/bash", "/launch" ]

22
launch

@ -8,18 +8,14 @@ service dnsmasq start
id user >/dev/null 2>&1
[ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} -G audio,video user
# NOTE: This workaround has been obsolete by "apt-get -y install libnm-glib4:i386 libnm-util2:i386".
# WORKAROUND to "steam launcher crashes on second run (debian sid in a chroot on debian wheezy) #3501"
# https://github.com/ValveSoftware/steam-for-linux/issues/3501
# rm -vf ~user/.local/share/Steam/config/config.vdf
# 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)
# su -l user -c "HOME=/home/user STEAM_RUNTIME=${STEAM_RUNTIME:-1} LD_PRELOAD=$LD_PRELOAD steam $@" |& grep -v 'wrong ELF class'
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64:"
LC_ALL=en_GB.UTF-8
LANG=en_US.UTF-8
STEAM_RUNTIME=${STEAM_RUNTIME:-1}
# LD_PRELOAD does not work well when you want to use Proton (modified version of Wine created by Steam)
# 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..."
# 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
export LC_ALL
export LANG
export STEAM_RUNTIME
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64:"
su -l user -c "HOME=/home/user STEAM_RUNTIME=${STEAM_RUNTIME:-1} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} steam $@" |& grep -v 'wrong ELF class'
gosu user steam $@ |& grep -v 'wrong ELF class'
Loading…
Cancel
Save