Giter Site home page Giter Site logo

docker-steam's Introduction

#docker-steam

A docker with steam preconfigured inside.
Configure your steamcmd.cmd to run your dedicated server.

Dependency

Install it

git clone https://github.com/Micka33/docker-steam.git
cd docker-steam
sudo docker build -t mysteamserver ./docker_files

Run it

sudo docker run -d -p 27015:27015 -p 27016:27016 -p 27017:27017 -p 27018:27018 -p 27019:27019 -p 27020:27020 -p 27021:27021 -p 27022:27022 -p 27023:27023 -p 27024:27024 -p 27025:27025 -p 27026:27026 -p 27027:27027 -p 27028:27028 -p 27029:27029 -p 27030:27030 -p 27031:27031 -p 27032:27032 -p 27033:27033 -p 27034:27034 -p 27035:27035 -p 27036:27036 -p 54168:54168 -p 27005:27005 -p 26901:26901   -p 27015:27015/udp -p 27016:27016/udp -p 27017:27017/udp -p 27018:27018/udp -p 27019:27019/udp -p 27020:27020/udp -p 27021:27021/udp -p 27022:27022/udp -p 27023:27023/udp -p 27024:27024/udp -p 27025:27025/udp -p 27026:27026/udp -p 27027:27027/udp -p 27028:27028/udp -p 27029:27029/udp -p 27030:27030/udp -p 27031:27031/udp -p 27032:27032/udp -p 27033:27033/udp -p 27034:27034/udp -p 27035:27035/udp -p 27036:27036/udp -p 54168:54168/udp -p 27005:27005/udp -p 26901:26901/udp -v `pwd`/mounted:/root/mounted mysteamserver

for inspection/debug, use this command

sudo docker run --rm -ti -p 27015:27015 -p 27016:27016 -p 27017:27017 -p 27018:27018 -p 27019:27019 -p 27020:27020 -p 27021:27021 -p 27022:27022 -p 27023:27023 -p 27024:27024 -p 27025:27025 -p 27026:27026 -p 27027:27027 -p 27028:27028 -p 27029:27029 -p 27030:27030 -p 27031:27031 -p 27032:27032 -p 27033:27033 -p 27034:27034 -p 27035:27035 -p 27036:27036 -p 54168:54168 -p 27005:27005 -p 26901:26901   -p 27015:27015/udp -p 27016:27016/udp -p 27017:27017/udp -p 27018:27018/udp -p 27019:27019/udp -p 27020:27020/udp -p 27021:27021/udp -p 27022:27022/udp -p 27023:27023/udp -p 27024:27024/udp -p 27025:27025/udp -p 27026:27026/udp -p 27027:27027/udp -p 27028:27028/udp -p 27029:27029/udp -p 27030:27030/udp -p 27031:27031/udp -p 27032:27032/udp -p 27033:27033/udp -p 27034:27034/udp -p 27035:27035/udp -p 27036:27036/udp -p 54168:54168/udp -p 27005:27005/udp -p 26901:26901/udp -v `pwd`/mounted:/root/mounted mysteamserver /sbin/my_init  -- bash -l

About it

Currently, this docker is configured to run a Classic Competitive CS:GO dedicated server.

How to run another dedicated server ?

2 files need to be modified, steamcmd.cmd and run_server.sh.

docker_files/steamcmd.cmd

// anonymous login is required in order to download CS:GO
// see https://developer.valvesoftware.com/wiki/SteamCMD#Automating_SteamCMD
// for more info
login anonymous

// Where all the files will be stored
// Don't change, unless you know what you are doing
force_install_dir /root/mounted/

// See https://developer.valvesoftware.com/wiki/Dedicated_Servers_List#Linux_Dedicated_Servers
// to find your dedicated server ID
// 740: Counter-Strike: Global Offensive Dedicated Server
app_update 740 validate

//It should always end by quit
quit

Change the steam application id 740 to yours. here is a list of all steam application IDs.

Some dedicated server require to be logged in.
Change like the following:

//login anonymous
@NoPromptForPassword 1
login <username> <password>

docker_files/run_server.sh

#!/bin/sh
cd /root/mounted

# Classic Casual
# exec ./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active
# Classic Competitive
exec ./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_bomb_se
# Arms Race
# exec ./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace
# Demolition
# exec ./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition
# Deathmatch
# exec ./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic

There are some examples CS:GO modes already configured in this file.
Be sure to always run your server using exec.

Refer to the approriate steam server configuration page. See this link, and this link for all servers.

docker-steam's People

Contributors

micka33 avatar penagwin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.