├── Dockerfile ├── README.md ├── rssh.conf └── start.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phusion/baseimage:0.9.17 2 | MAINTAINER EdenServers 3 | 4 | #Ubuntu requirements 5 | WORKDIR /etc/apt/sources.list.d 6 | RUN echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list 7 | RUN dpkg --add-architecture i386 8 | RUN apt-get -y update 9 | RUN apt-get -y install ia32-libs 10 | RUN apt-get -y install wget 11 | 12 | #Steamcmd installation 13 | RUN mkdir -p /server/steamcmd 14 | RUN mkdir -p /server/csgo 15 | WORKDIR /server/steamcmd 16 | RUN wget http://media.steampowered.com/client/steamcmd_linux.tar.gz 17 | RUN tar -xvzf steamcmd_linux.tar.gz 18 | 19 | RUN apt-get install -y openssh-server rssh 20 | ADD rssh.conf /etc/rssh.conf 21 | 22 | #Server config 23 | EXPOSE 27015 24 | 25 | #Server Start 26 | WORKDIR /server/csgo 27 | ADD start.sh /server/csgo/start.sh 28 | RUN chmod 755 /server/csgo/start.sh 29 | 30 | CMD ["/server/csgo/start.sh"] 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Official Counter-Strike : Global Offensive Container on EdenServers 2 | 3 | [![Run on EdenServers](https://img.shields.io/badge/EdenServers-view-blue.svg)](http://www.edenservers.us) 4 | [![](https://badge.imagelayers.io/edenservers/docker-csgo:latest.svg)](https://imagelayers.io/?images=edenservers/docker-csgo:latest 'Get your own badge on imagelayers.io') 5 | 6 | ![](http://image.noelshack.com/fichiers/2015/35/1440632013-csgo-logo1.png) 7 | 8 | All-in-one Counter-Strike : Global Offensive Server Container built for [EdenServers](http://www.edenservers.us). 9 | 10 | It also includes an SCP server. 11 | 12 | --- 13 | 14 | **This image is meant to be used on an EdenServers Server.** 15 | 16 | Our images are built to specifically run for our services. You can run it directly with Docker though. 17 | 18 | --- 19 | ### 1.0.0 (2015-08-27) 20 | 21 | This initial version contains: 22 | 23 | * *steamcmd*, and a pre-installed CS:GO Server 24 | * *scp* Server to upload and download files 25 | 26 | --- 27 | 28 | ## Install 29 | 30 | $ docker pull edenservers/docker-csgo 31 | 32 | --- 33 | 34 | ## Config 35 | 36 | Instructions for CS:GO config can be found [here](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers). 37 | 38 | | Environment Variable | Description | 39 | | ------------- | ------------- | 40 | | GAME_TYPE | CS:GO Gametype | 41 | | GAME_MODE | CS:GO Gamemode | 42 | | MAPGROUP | CS:GO Mapgroup | 43 | | MAP | CS:GO Map | 44 | | STARTUP_OPTIONS | Additional startup options | 45 | | USERNAME | SCP Username | 46 | | PASSWORD | SCP Password | 47 | 48 | | Port | Description | 49 | | ------------- | ------------- | 50 | | 27015 | CS:GO and RCON | 51 | | 22 | SCP | 52 | 53 | --- 54 | 55 | ## Run example 56 | 57 | $ docker run -e GAME_TYPE=0 -e GAME_MODE=0 -e MAPGROUP=mg_bomb -e MAP=de_dust2 -e USERNAME=edenservers -e PASSWORD=edenservers -p 27015:27015 -p 27015:27015/udp -p 1234:22 -d edenservers/docker-csgo 58 | 59 | --- 60 | 61 | Made by [![EdenServers](http://image.noelshack.com/fichiers/2015/35/1440630894-logo.png)](https://www.edenservers.us) 62 | -------------------------------------------------------------------------------- /rssh.conf: -------------------------------------------------------------------------------- 1 | # This is the default rssh config file 2 | 3 | # set the log facility. "LOG_USER" and "user" are equivalent. 4 | logfacility = LOG_USER 5 | 6 | # Leave these all commented out to make the default action for rssh to lock 7 | # users out completely... 8 | 9 | allowscp 10 | allowsftp 11 | #allowcvs 12 | #allowrdist 13 | allowrsync 14 | #allowsvnserve 15 | 16 | # set the default umask 17 | umask = 022 18 | 19 | # If you want to chroot users, use this to set the directory where the root of 20 | # the chroot jail will be located. 21 | # 22 | # if you DO NOT want to chroot users, LEAVE THIS COMMENTED OUT. 23 | # chrootpath = /usr/local/chroot 24 | 25 | # You can quote anywhere, but quotes not required unless the path contains a 26 | # space... as in this example. 27 | #chrootpath = "/usr/local/my chroot" 28 | 29 | ########################################## 30 | # EXAMPLES of configuring per-user options 31 | 32 | #user=rudy:077:000100: # the path can simply be left out to not chroot 33 | #user=rudy:077:000100 # the ending colon is optional 34 | 35 | #user=rudy:011:001000: # cvs, with no chroot 36 | #user=rudy:011:010000: # rdist, with no chroot 37 | #user=rudy:011:100000: # rsync, with no chroot 38 | #user=rudy:011:000001: # svnserve, with no chroot 39 | #user="rudy:011:000010:/usr/local/chroot" # whole user string can be quoted 40 | #user=rudy:01"1:000010:/usr/local/chroot" # or somewhere in the middle, freak! 41 | #user=rudy:'011:000010:/usr/local/chroot' # single quotes too 42 | 43 | # if your chroot_path contains spaces, it must be quoted... 44 | # In the following examples, the chroot_path is "/usr/local/my chroot" 45 | #user=rudy:011:000010:"/usr/local/my chroot" # scp with chroot 46 | #user=rudy:011:000100:"/usr/local/my chroot" # sftp with chroot 47 | #user=rudy:011:000110:"/usr/local/my chroot" # both with chroot 48 | 49 | # Spaces before or after the '=' are fine, but spaces in chrootpath need 50 | # quotes. 51 | #user = "rudy:011:000010:/usr/local/my chroot" 52 | #user = "rudy:011:000010:/usr/local/my chroot" # neither do comments at line end 53 | 54 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Setting up SFTP 4 | if ! id -u "$USERNAME" >/dev/null 2>&1; then 5 | PASSWORD=$(perl -e 'print crypt($ARGV[0], "password")' $PASSWORD) 6 | useradd -d /server/csgo --shell /usr/bin/rssh --password $PASSWORD $USERNAME 7 | chown -R $USERNAME:$USERNAME /server/csgo 8 | fi 9 | 10 | /etc/init.d/ssh start 11 | 12 | cd /server/steamcmd && ./steamcmd.sh +login anonymous \ 13 | +force_install_dir /server/csgo \ 14 | +app_update 740 validate \ 15 | +quit 16 | 17 | cd /server/csgo && ./srcds_run -game csgo -console -usercon +game_type $GAME_TYPE \ 18 | +game_mode $GAME_MODE \ 19 | +mapgroup $MAPGROUP \ 20 | +map $MAP $STARTUP_OPTIONS 21 | --------------------------------------------------------------------------------