This repository has been archived on 2023-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
steam-container/Dockerfile

28 lines
1.0 KiB
Docker

FROM archlinux:latest
LABEL Description="This image is based on Archlinux and is used for running game servers with SteamCMD" \
Author="david@socialnerds.org" \
Version="0.1" \
License="MIT"
ENV USER_ID=1000
ENV GROUP_ID=1000
ENV USERNAME=steam
VOLUME [ "/home/${USERNAME}" ]
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm --needed base-devel openssh git sudo cargo tmux vim wget python unzip bc jq netcat && \
groupadd -g ${GROUP_ID} ${USERNAME} && \
useradd -u ${USER_ID} -g ${GROUP_ID} -M -d /home/${USERNAME} -s /bin/bash ${USERNAME} && \
chown ${USER_ID}:${GROUP_ID} /home/${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
systemctl enable sshd.service && \
cd /tmp && ls -la && sudo -u ${USERNAME} git clone https://aur.archlinux.org/paru.git && cd paru && \
sudo -u ${USERNAME} makepkg -si --noconfirm && \
sudo -u ${USERNAME} paru -S --noconfirm steamcmd bsdmainutils
USER ${USERNAME}
WORKDIR /home/${USERNAME}
CMD top -b