~mapperr/dockerfiles

10733aed5dc51695a54cbe4fed40d0b63e12e37c — mapperr 9 months ago 03b501f
game
M archlinux/Dockerfile => archlinux/Dockerfile +8 -3
@@ 41,6 41,11 @@ RUN \
    ssh-keygen -A && \
    sed -i "s/#Port 22/Port ${SSH_PORT}/" /etc/ssh/sshd_config

RUN \
    echo "[multilib]" >> /etc/pacman.conf && \
    echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf && \
    pacman -Sy

USER 1000

RUN \


@@ 49,8 54,8 @@ RUN \
    makepkg -sif --noconfirm

RUN \
    curl https://git.sr.ht/~mapperr/dotfiles/blob/master/.bin/dff >$HOME/dff && \
    chmod u+x $HOME/dff
    curl https://git.sr.ht/~mapperr/dotfiles/blob/master/.bin/dff >/home/${MY_USER}/dff && \
    chmod u+x /home/${MY_USER}/dff

RUN \
    --mount=type=cache,target=/var/cache/pacman \


@@ 59,7 64,7 @@ RUN \
    yay --noconfirm -Sy  && \
    yay --noconfirm -S archlinux-keyring  && \
    yay --noconfirm -Su  && \
    yay --noconfirm -S $(cat /home/${MY_USER}/yay_installs)
    yay --noconfirm -S $(cat /home/${MY_USER}/yay_installs | grep -v '^#')

EXPOSE ${SSH_PORT}
ENTRYPOINT ["sudo", "/usr/bin/sshd", "-D"]

M archlinux/game_installs => archlinux/game_installs +7 -0
@@ 37,4 37,11 @@ python-netifaces
pipewire
pipewire-alsa
alsa-utils
# game-related
gtk3
wine
wine-mono
wine-gecko
nss
# AUR
heroic-games-launcher-bin

A archlinux/game_provision.sh => archlinux/game_provision.sh +4 -0
@@ 0,0 1,4 @@
#! /bin/sh

# https://confluence.jaytaala.com/display/TKB/Install+a+package+with+all+optional+dependencies+in+Arch+based+distros
sudo pacman --noconfirm -S --asdeps --needed $(pacman -Si wine | sed -n '/^Opt/,/^Conf/p' | sed '$d' | sed 's/^Opt.*://g' | sed 's/^\s*//g' | tr '\n' ' ')

M archlinux/provision.sh => archlinux/provision.sh +3 -3
@@ 1,9 1,9 @@
#! /bin/sh

if ! test -d ~/.dotfiles; then
  ./dff clone git@git.sr.ht:~mapperr/dotfiles
  ./dff checkout -f
  ./dff crypt unlock
  ~/dff clone git@git.sr.ht:~mapperr/dotfiles
  ~/dff checkout -f
  ~/dff crypt unlock

  test -d ~/.dotfiles && test -r ~/dff && rm -f ~/dff
fi

M archlinux/run.sh => archlinux/run.sh +8 -2
@@ 11,7 11,10 @@ cont_name="$img_name"
yay_install_file="${context}_installs"
test -z "$my_user" && my_user="arch"

ssh_port=$(string_to_port_number "$context")
ssh_port=$DKR_SSH_PORT
test -z "$ssh_port" &&
    ssh_port=$(string_to_port_number "$context")

test -z "$ssh_port" &&
    echo "error converting string to port number" &&
    echo "check that the function string_to_port_number is available" &&


@@ 25,6 28,9 @@ if test "$cmd" = "build"; then
        --build-arg="YAY_INSTALL_FILE=${yay_install_file}" \
        -t $img_name  .

elif test "$cmd" = "rm"; then
    docker rm -f $cont_name

elif test "$cmd" = "setup"; then
    # --ulimit "nofile=1024:1048576" \
    # "restart no" due to failed remounting before wayland starts


@@ 70,7 76,7 @@ elif test "$cmd" = "setup"; then
    fi

elif test "$cmd" = "ssh"; then
    sshpass -p ${my_user} ssh -p $ssh_port ${my_user}@localhost
    sshpass -p ${my_user} ssh -o StrictHostKeyChecking=no -p $ssh_port ${my_user}@localhost
else
    echo "usage:
    $0 build