steam.Dockerfile
· 1.7 KiB · Docker
Raw
FROM debian:trixie
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Set locale
RUN apt-get update && apt-get install -y --no-install-recommends \
locales && \
apt-get clean && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
# Install Wayland-specific packages
RUN apt-get update && apt-get install -y --no-install-recommends \
dbus \
libwayland-client0 \
libwayland-egl1 && \
apt-get clean
# Install X-specific packages
RUN apt-get update && apt-get install -y --no-install-recommends \
dbus-x11 && \
apt-get clean
# Add contrib, default is only main
RUN sed -i 's/^Components:.*/Components: main contrib/g' /etc/apt/sources.list.d/debian.sources
# Add 32-bit arch for Steam libraries
RUN dpkg --add-architecture i386
# Install Steam
RUN apt-get update && apt-get install -y --no-install-recommends \
steam-installer \
pciutils \
libfontconfig1:i386 && \
apt-get clean
# Additional
# TODO: What is really needed?
RUN apt-get update && apt-get install -y --no-install-recommends \
vulkan-tools \
mesa-utils \
x11-xserver-utils \
libvulkan1 \
mesa-vulkan-drivers && \
apt-get clean
# TODO: Does `-storebeta` even work?
# https://developer.valvesoftware.com/wiki/Command_line_options_(Steam)
CMD ["/usr/games/steam", "-storebeta"]
# xhost +
# docker run -it --name steam -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --privileged steam:trixie
# xhost -
# See also https://git.sr.ht/~whynothugo/steam-container
| 1 | FROM debian:trixie |
| 2 | |
| 3 | ENV DEBIAN_FRONTEND=noninteractive |
| 4 | ENV LANG=en_US.UTF-8 |
| 5 | ENV LANGUAGE=en_US:en |
| 6 | ENV LC_ALL=en_US.UTF-8 |
| 7 | |
| 8 | # Set locale |
| 9 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 10 | locales && \ |
| 11 | apt-get clean && \ |
| 12 | sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ |
| 13 | locale-gen |
| 14 | |
| 15 | # Install Wayland-specific packages |
| 16 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 17 | dbus \ |
| 18 | libwayland-client0 \ |
| 19 | libwayland-egl1 && \ |
| 20 | apt-get clean |
| 21 | |
| 22 | # Install X-specific packages |
| 23 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 24 | dbus-x11 && \ |
| 25 | apt-get clean |
| 26 | |
| 27 | # Add contrib, default is only main |
| 28 | RUN sed -i 's/^Components:.*/Components: main contrib/g' /etc/apt/sources.list.d/debian.sources |
| 29 | |
| 30 | # Add 32-bit arch for Steam libraries |
| 31 | RUN dpkg --add-architecture i386 |
| 32 | |
| 33 | # Install Steam |
| 34 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 35 | steam-installer \ |
| 36 | pciutils \ |
| 37 | libfontconfig1:i386 && \ |
| 38 | apt-get clean |
| 39 | |
| 40 | # Additional |
| 41 | # TODO: What is really needed? |
| 42 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 43 | vulkan-tools \ |
| 44 | mesa-utils \ |
| 45 | x11-xserver-utils \ |
| 46 | libvulkan1 \ |
| 47 | mesa-vulkan-drivers && \ |
| 48 | apt-get clean |
| 49 | |
| 50 | # TODO: Does `-storebeta` even work? |
| 51 | # https://developer.valvesoftware.com/wiki/Command_line_options_(Steam) |
| 52 | CMD ["/usr/games/steam", "-storebeta"] |
| 53 | |
| 54 | # xhost + |
| 55 | # docker run -it --name steam -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --privileged steam:trixie |
| 56 | # xhost - |
| 57 | |
| 58 | # See also https://git.sr.ht/~whynothugo/steam-container |
| 59 |