initial commit

This commit is contained in:
david 2021-02-12 00:26:16 +01:00
commit 35eda98e69
3 changed files with 44 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/steam

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
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

16
docker-compose.yml Normal file
View File

@ -0,0 +1,16 @@
version: "3.0"
services:
steam:
image: steam-container:latest
build: .
container_name: steam
volumes:
- ./steam:/home/steam
ports:
- 2233:22/tcp
- 2302:2302/tcp
- 2302:2302/udp
- 2303:2303/tcp
- 2303:2303/udp
restart: unless-stopped