Dockerfile to run a CS:S srcds server
You can use it in a compose file:
version: '2'
services:
server:
image: threesquared/docker-css-server:latest
environment:
- RCON_PASSWORD=mypass
- SERVER_HOSTNAME="My Server"
ports:
- "27005:27005/udp"
- "27015:27015"
- "27015:27015/udp"
volumes:
- ./cfg:/home/steam/server/cstrike/cfg
- ./maps:/home/steam/server/cstrike/maps
Or in a Dockerfile:
FROM threesquared/docker-css-server
ENV SERVER_HOSTNAME="My Server"
COPY ./cfg/ /home/steam/server/cstrike/cfg
COPY ./maps/ /home/steam/server/cstrike/maps
CMD ["+maxplayers", "32", "+map", "aim_spacewar"]
$ docker build -t threesquared/docker-css-server .