Coder Social home page Coder Social logo

projeman / counter-strike_server-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from febley/counter-strike_server

0.0 0.0 0.0 11 KB

Docker Image for a dedicated Counter-Strike 1.6 server

Home Page: https://hub.docker.com/r/febley/counter-strike_server/

License: MIT License

Shell 12.62% Dockerfile 87.38%

counter-strike_server-docker's Introduction

Counter-Strike 1.6 Server Docker Image

This image is based on debian:9 and the game server is set up via steamcmd. It aims to provide a simple method to set up a basic and also customizable Counter-Strike 1.6 server via Docker.

Docker Automated build Docker Build Status Download size Commit

Quick start

The fastest way to set this up is to pull the image and start it via docker run.

docker pull febley/counter-strike_server
docker run --name counter-strike_server -p 27015:27015/udp -p 27015:27015 febley/counter-strike_server:latest

However it's recommend to run the server via docker-compose. You can find an example docker-compose.yml below.

Available environment variables

Variable Value
PORT 27015
MAP de_dust2
MAXPLAYERS 16
SV_LAN 0

Custom config files

You can add you own server.cfg, banned.cfg, listip.cfg and mapcycle.txt by linking them as volumes into the image.

-v /path/to/your/server.cfg:/hlds/cstrike/server.cfg

The complete command looks like this:

docker run --name counter-strike_server -p 27015:27015/udp -p 27015:27015 -v /path/to/your/server.cfg:/hlds/cstrike/server.cfg febley/counter-strike_server:latest

Keep in mind the server.cfg file can override the settings from your environment variables:
MAP, MAXPLAYERS and SV_LAN

Example server.cfg

// Use this file to configure your DEDICATED server.
// This config file is executed on server start.

// disable autoaim
sv_aim 0

// disable clients' ability to pause the server
pausable 0

// default server name. Change to "Bob's Server", etc.
hostname "Counter-Strike 1.6 Server"

// RCON password
rcon_password "password"

// default map
map de_dust2

// maximum client movement speed
sv_maxspeed 320

// 20 minute timelimit
mp_timelimit 20

// disable cheats
sv_cheats 0

// load ban files
exec listip.cfg
exec banned.cfg

Docker Compose

Create a docker-compose.yml file and start the server via docker-compose up -d.

Example docker-compose.yml

version: '3'

services:

  hlds:
    container_name: counter-strike_server
    image: febley/counter-strike_server:latest
    restart: always
    environment:
      - PORT=27015
      - MAP=de_dust2
      - MAXPLAYERS=16
      - SV_LAN=0
    ports:
      - 27015:27015/udp
      - 27015:27015
    volumes:
      - /path/to/your/banned.cfg:/hlds/cstrike/banned.cfg
      - /path/to/your/listip.cfg:/hlds/cstrike/listip.cfg
      - /path/to/your/server.cfg:/hlds/cstrike/server.cfg
      - /path/to/your/mapcycle.txt:/hlds/cstrike/mapcycle.txt

counter-strike_server-docker's People

Contributors

febley 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.