Compare commits

...

27 Commits
stable ... v1.1

Author SHA1 Message Date
mattieserver
3ca64f4fb0 Update Dockerfile 2016-03-17 10:20:22 +01:00
mattieserver
187727f842 Update and rename start-csgo.sh to start-server.sh 2016-03-17 10:20:04 +01:00
mattieserver
f8c7456f4f Update Dockerfile 2016-03-17 10:19:28 +01:00
mattieserver
ad05453649 Update start-csgo.sh 2016-03-09 17:41:58 +01:00
mattieserver
c17e75cc71 Update README.md 2016-03-09 17:41:16 +01:00
mattieserver
e9d87318a6 Update Dockerfile 2016-03-09 17:39:10 +01:00
mattieserver
26bfd6da1b Update README.md 2016-03-07 19:01:02 +01:00
mattieserver
88292985fe Update README.md 2016-03-07 18:56:19 +01:00
mattieserver
ea5d4f2976 Update Dockerfile 2016-03-07 17:50:06 +01:00
mattieserver
8c0d0071bd Update Dockerfile 2016-03-07 17:48:37 +01:00
mattieserver
2bccec4433 Update start-csgo.sh 2016-03-07 17:08:15 +01:00
mattieserver
f4360635a8 Update Dockerfile 2016-03-07 16:36:34 +01:00
mattieserver
3dc4af5e5f Update start-csgo.sh 2016-03-07 16:22:09 +01:00
mattieserver
ddc03b61e8 Update Dockerfile 2016-03-07 16:21:53 +01:00
mattieserver
231c1d240f Update Dockerfile 2016-03-07 16:04:49 +01:00
mattieserver
aeaafcd2f9 Update Dockerfile 2016-03-07 15:48:29 +01:00
mattieserver
d96bee94ee Update start-csgo.sh 2016-03-07 15:47:27 +01:00
mattieserver
9e303e8339 Update start-csgo.sh 2016-03-07 15:36:11 +01:00
mattieserver
9df1362eb5 Update Dockerfile 2016-03-07 15:32:19 +01:00
mattieserver
c1e7d6afe7 Update Dockerfile 2016-03-07 15:16:25 +01:00
mattieserver
95b98fa0aa Update Dockerfile 2016-03-07 15:10:09 +01:00
mattieserver
5ab2ef7191 Update start-csgo.sh 2016-03-07 15:07:32 +01:00
mattieserver
2893ac5ecb Update Dockerfile 2016-03-07 15:06:51 +01:00
mattieserver
c70267ae8e Update README.md 2016-03-07 12:05:02 +01:00
mattieserver
01b8ef598b Update README.md 2016-03-07 12:03:34 +01:00
mattieserver
52142aabac Update README.md 2016-03-07 11:53:52 +01:00
mattieserver
02b5134995 Update start-csgo.sh 2016-03-06 18:28:37 +01:00
3 changed files with 20 additions and 13 deletions

View File

@@ -2,9 +2,10 @@ FROM ubuntu
MAINTAINER Mattie MAINTAINER Mattie
RUN apt-get -y update RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get -y install libstdc++6:i386
RUN apt-get -y install wget RUN apt-get -y install wget
RUN apt-get -y install lib32gcc1
ENV DATA_DIR="/serverdata" ENV DATA_DIR="/serverdata"
ENV STEAMCMD_DIR="${DATA_DIR}/steamcmd" ENV STEAMCMD_DIR="${DATA_DIR}/steamcmd"
@@ -12,18 +13,22 @@ ENV SERVER_DIR="${DATA_DIR}/serverfiles"
ENV GAME_ID="740" ENV GAME_ID="740"
ENV GAME_NAME="csgo" ENV GAME_NAME="csgo"
ENV GAME_PARAMS="+game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2" ENV GAME_PARAMS="+game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2"
ENV GAME_PORT=27015
RUN mkdir $DATA_DIR RUN mkdir $DATA_DIR
RUN mkdir $STEAMCMD_DIR RUN mkdir $STEAMCMD_DIR
RUN mkdir $SERVER_DIR RUN mkdir $SERVER_DIR
RUN mkdir -p ~/.steam/sdk32
EXPOSE 1200/udp RUN wget -q -O ${STEAMCMD_DIR}/steamcmd_linux.tar.gz http://media.steampowered.com/client/steamcmd_linux.tar.gz \
EXPOSE 27000-27045/udp && tar --directory ${STEAMCMD_DIR} -xvzf /serverdata/steamcmd/steamcmd_linux.tar.gz \
EXPOSE 27000-27045 && rm ${STEAMCMD_DIR}/steamcmd_linux.tar.gz \
VOLUME [${STEAMCMD_DIR}] && chmod -R 774 ${STEAMCMD_DIR} ${STEAMCMD_DIR}/linux32 $SERVER_DIR \
&& ln -s ${STEAMCMD_DIR}/linux32/ ~/.steam/sdk32
RUN ulimit -n 2048
ADD /scripts/ /opt/scripts/ ADD /scripts/ /opt/scripts/
RUN chmod -R 774 /opt/scripts/ RUN chmod -R 774 /opt/scripts/
#Server Start #Server Start
ENTRYPOINT ["/opt/scripts/start-csgo.sh"] ENTRYPOINT ["/opt/scripts/start-server.sh"]

View File

@@ -1,8 +1,8 @@
#Steamcmd in docker #Steamcmd in docker
This dockerfill will download/install steamcmd. This dockerfill will download/install steamcmd.
It also will install the server you want(like csgo,tf2,ins ...) It will also install the server you want(like csgo,tf2,ins ...)
##env params ##Env params
| Name | Value | Default | | Name | Value | Default |
| --- | --- | --- | | --- | --- | --- |
| DATA_DIR | main folder | /serverdata | | DATA_DIR | main folder | /serverdata |
@@ -11,6 +11,7 @@ It also will install the server you want(like csgo,tf2,ins ...)
| GAME_ID | steamid for server | 740 | | GAME_ID | steamid for server | 740 |
| GAME_NAME | srcds gamename | csgo | | GAME_NAME | srcds gamename | csgo |
| GAME_PARAMS | values to start the server | +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 | | GAME_PARAMS | values to start the server | +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 |
| GAME_PORT | port the server will be running on | 27015 |
>**NOTE** GAME_ID values can be found [here](https://developer.valvesoftware.com/wiki/Dedicated_Servers_List) >**NOTE** GAME_ID values can be found [here](https://developer.valvesoftware.com/wiki/Dedicated_Servers_List)
@@ -19,10 +20,11 @@ It also will install the server you want(like csgo,tf2,ins ...)
##Run example ##Run example
``` ```
docker run --name csgo-server -d \ docker run --name csgo-server -d \
-p 27015:27015 -p 27015:27015/udp \
--env 'GAME_ID=740' \ --env 'GAME_ID=740' \
--env 'GAME_NAME=csgo' \ --env 'GAME_NAME=csgo' \
--env 'GAME_PORT=27015' \
--env 'GAME_PARAMS=+game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2' \ --env 'GAME_PARAMS=+game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2' \
--volume /share/CACHEDEV1_DATA/Public/VM/Docker/CSGO/steamcmd:/serverdata/steamcmd \ --volume /share/CACHEDEV1_DATA/Public/VM/Docker/CSGO:/serverdata \
--volume /share/CACHEDEV1_DATA/Public/VM/Docker/CSGO/serverfiles:/serverdata/serverfiles \
mattie/docker-steamcmd-server:latest mattie/docker-steamcmd-server:latest
``` ```

View File

@@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
if [ ! -f ${STEAMCMD_DIR}/steamcmd.sh ]; then if [ ! -f ${STEAMCMD_DIR}/steamcmd.sh ]; then
echo "Steamcmd not found!" echo "Steamcmd not found!"
cd $STEAMCMD_DIR
wget -q -O ${STEAMCMD_DIR}/steamcmd_linux.tar.gz http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -q -O ${STEAMCMD_DIR}/steamcmd_linux.tar.gz http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --directory ${STEAMCMD_DIR} -xvzf /serverdata/steamcmd/steamcmd_linux.tar.gz tar --directory ${STEAMCMD_DIR} -xvzf /serverdata/steamcmd/steamcmd_linux.tar.gz
rm ${STEAMCMD_DIR}/steamcmd_linux.tar.gz rm ${STEAMCMD_DIR}/steamcmd_linux.tar.gz
chmod -R 774 ${STEAMCMD_DIR}/steamcmd.sh ${STEAMCMD_DIR}/linux32/steamcmd chmod -R 774 ${STEAMCMD_DIR}/steamcmd.sh ${STEAMCMD_DIR}/linux32/steamcmd
ln -s ${STEAMCMD_DIR}/linux32/ ~/.steam/sdk32
fi fi
echo "---Update steamcmd---" echo "---Update steamcmd---"
@@ -21,4 +21,4 @@ ${STEAMCMD_DIR}/steamcmd.sh \
+quit +quit
echo "---Start Server---" echo "---Start Server---"
${SERVER_DIR}/srcds_run -game $GAME_NAME -usercon $GAME_PARAMS ${SERVER_DIR}/srcds_run -game $GAME_NAME -usercon -console $GAME_PARAMS +ip 0.0.0.0 +port $GAME_PORT +sv_lan 0