Initial commit

This commit is contained in:
2018-09-05 18:22:25 +09:00
parent da1ed74b19
commit d64326bbf9
2 changed files with 57 additions and 1 deletions

54
Dockerfile Normal file
View File

@@ -0,0 +1,54 @@
FROM ubuntu:18.04
LABEL Name=docker-steamcmd Version=1.0.0 Maintainer="Dave Jansen - Pretty Basic"
ENV PORT_STEAM=27015
ENV STEAMCMD_URL="https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz"
ENV USER_STEAM_ID=1000
# For debugging purposes only
ENV DEBUGGER=
# Start by updating and installing the required packages
RUN set -ex; \
apt-get -y update; \
apt-get -y upgrade; \
apt-get install -y curl lib32gcc1;
# Adjust open file limitations -- This is required for certain games, so let's set it by default
RUN ulimit -n 100000;
# Create a user and usergroup for Steam
RUN set -ex; \
addgroup \
-gid ${USER_STEAM_ID} \
steam; \
adduser \
--disabled-login \
--shell /bin/bash \
--gecos "" \
--gid ${USER_STEAM_ID} \
--uid ${USER_STEAM_ID} \
steam;
# Create the directory SteamCMD will live in, and set its ownership
RUN mkdir -p /opt/steamcmd
RUN chown steam:steam /opt/steamcmd
WORKDIR /opt/steamcmd
# Make sure everything is run as the Steam user
USER steam
# Download & unpack SteamCMD
RUN curl -sqL ${STEAMCMD_URL} | tar zxfv -
# Announce the default Steam ports
# Note: You should open game-specific ports, too.
EXPOSE ${PORT_STEAM}/tcp ${PORT_STEAM}/udp
# Optional: Initial run with anonymous login
# This should stay disabled when using Docker Hub to auto-build, for example
#RUN [ "./steamcmd.sh", "+@NoPromptForPassword 1", "+login anonymous", "+quit" ]
ENTRYPOINT [ "/opt/steamcmd/steamcmd.sh" ]

View File

@@ -1 +1,3 @@
# docker-steamcmd
# SteamCMD for Docker
Based on the Ubuntu 18.04 image. This is a barebones image designed to be used as a starting point for your own image.