Compare commits
2 commits
4cca51744b
...
adeb966a95
Author | SHA1 | Date | |
---|---|---|---|
adeb966a95 | |||
940719d699 |
7 changed files with 64 additions and 1 deletions
13
apps/steam/Containerfile
Normal file
13
apps/steam/Containerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM dobu/deps-base-ubuntu-jammy:latest
|
||||
|
||||
ARG UPSTREAM_VERSION
|
||||
|
||||
RUN apt-get -y update && apt-get -y install steam
|
||||
|
||||
USER user
|
||||
|
||||
ENV PROTON_NO_FSYNC=1
|
||||
|
||||
# We disable CEF sandbox because we already have podman
|
||||
# and our seccomp filters do not permit another layer of namespaces
|
||||
ENTRYPOINT [ "/usr/games/steam", "-no-cef-sandbox" ]
|
4
apps/steam/control
Normal file
4
apps/steam/control
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
TRACK_PACKAGE_UBUNTU="steam"
|
||||
DESKTOP_FILE_PATH="/usr/share/applications/steam.desktop"
|
||||
|
|
@ -16,6 +16,11 @@ if [ ! -z "${TRACK_PACKAGE_ARCHLINUX+x}" ]; then
|
|||
upstream_ver="$(get_archlinux_pkg_ver "$TRACK_PACKAGE_ARCHLINUX")"
|
||||
log "Latest upstream version: $upstream_ver"
|
||||
extra_args="$extra_args --build-arg UPSTREAM_VERSION=$upstream_ver"
|
||||
elif [ ! -z "${TRACK_PACKAGE_UBUNTU+x}" ]; then
|
||||
log "Fetching upstream package version from Ubuntu (Launchpad)"
|
||||
upstream_ver="$(get_ubuntu_pkg_ver "$TRACK_PACKAGE_UBUNTU")"
|
||||
log "Latest upstream version: $upstream_ver"
|
||||
extra_args="$extra_args --build-arg UPSTREAM_VERSION=$upstream_ver"
|
||||
fi
|
||||
|
||||
podman build -t "$image_name" "$script_path/$1" $extra_args
|
||||
|
|
|
@ -45,7 +45,9 @@ podman cp "$tmp_container_name:/usr/share/icons" ./icons
|
|||
log "Destroying temporary container $tmp_container_name"
|
||||
podman rm -f -v "$tmp_container_name"
|
||||
|
||||
desktop_file_content="$(cat ./$1.desktop)"
|
||||
# We delete everything after the first [Desktop Entry]
|
||||
# because we don't intend to support all the weird actions an app might have
|
||||
desktop_file_content="$(cat ./$1.desktop | awk '/^\[.*\]$/ && ++f == 2 { exit } 1')"
|
||||
|
||||
icon_name="$(echo "$desktop_file_content" | grep "Icon=" | head -1 | cut -d'=' -f 2)"
|
||||
[ -z "$icon_name" ] && die "No icon defined for $1"
|
||||
|
|
30
deps/base-ubuntu-jammy/Containerfile
vendored
Normal file
30
deps/base-ubuntu-jammy/Containerfile
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM docker.io/ubuntu:jammy
|
||||
|
||||
# Basic setup -- enable i386, update repo
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt-get update && apt-get -y upgrade
|
||||
|
||||
# Base package list reflects the Arch Linux image
|
||||
RUN apt-get -y install \
|
||||
libegl-mesa0 libgl1-mesa-dri mesa-vulkan-drivers mesa-va-drivers \
|
||||
libwayland-client0 libwayland-cursor0 libwayland-egl1 \
|
||||
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 \
|
||||
libxi6 libxinerama1 libxrandr2 libxrender1 libpulse0 pulseaudio \
|
||||
fonts-noto-core fonts-noto-extra fonts-noto-cjk \
|
||||
fonts-noto-cjk-extra wayland-protocols \
|
||||
libegl-mesa0:i386 libgl1-mesa-dri:i386 mesa-vulkan-drivers:i386 mesa-va-drivers:i386 \
|
||||
libwayland-client0:i386 libwayland-cursor0:i386 libwayland-egl1:i386 \
|
||||
libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxext6:i386 libxfixes3:i386 \
|
||||
libxi6:i386 libxinerama1:i386 libxrandr2:i386 libxrender1:i386 libpulse0:i386
|
||||
|
||||
RUN groupadd -g 1100 user && useradd -g user -u 1100 -m user \
|
||||
&& mkdir /xdg_runtime && mkdir /tmp/.X11-unix \
|
||||
&& chown user:user /xdg_runtime && chown user:user /tmp/.X11-unix
|
||||
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV XDG_RUNTIME_DIR=/xdg_runtime
|
||||
|
||||
VOLUME /home/user
|
||||
VOLUME /xdg_runtime
|
||||
VOLUME /tmp/.X11-unix
|
|
@ -82,6 +82,8 @@ podman run --rm "${podman_security_args[@]}" --name "$container_name" \
|
|||
`# Miscellaneous` \
|
||||
-e XDG_SESSION_TYPE=wayland \
|
||||
-e TZ="$(date +%Z)" \
|
||||
`# SHM is needed by some browser engines (such as CEF used by Steam)`\
|
||||
--shm-size=1G \
|
||||
`# Scaling parameters` \
|
||||
-e GDK_SCALE="$GDK_SCALE" \
|
||||
-e QT_SCALE_FACTOR="$QT_SCALE_FACTOR" \
|
||||
|
|
|
@ -94,3 +94,10 @@ ensure_sommelier() {
|
|||
get_archlinux_pkg_ver() {
|
||||
curl https://archlinux.org/packages/$1/json/ 2>/dev/null | jq -r '. | .pkgver + "-" + .pkgrel'
|
||||
}
|
||||
|
||||
# Note: this does not specify which version of Ubuntu to use, because we don't actually care
|
||||
# this version can and will only used to invalidate Docker cache, and we only need a vague
|
||||
# idea of whether this package has been updated upstream.
|
||||
get_ubuntu_pkg_ver() {
|
||||
curl "https://api.launchpad.net/1.0/ubuntu/+archive/primary?ws.op=getPublishedSources&source_name=$1&exact_match=true" | jq -r '.entries[0].source_package_version'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue