FROM debian:buster

# Create steam user 
RUN useradd -m -d /home/steam steam

# Install dependencies (and goodies for mods)
RUN export DEBIAN_FRONTEND=noninteractive && \
    apt-get update && \
    apt-get install --yes -qq --no-install-recommends \
        curl \
	lib32gcc1 \
	lib32stdc++6 \
	unzip \
	git && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /opt/steamcmd

# Download, extract and update SteamCMD
RUN curl -s http://media.steampowered.com/installer/steamcmd_linux.tar.gz | tar -vxz && \
    ./steamcmd.sh +quit

ENTRYPOINT ["/opt/steamcmd/steamcmd.sh"]