Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov committed Apr 4, 2024
1 parent b7bf2ee commit 1aa4d0d
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/.teamplate-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,33 @@

<img src="https://raw.githubusercontent.com/docker-library/docs/c350af05d3fac7b5c3f6327ac82fe4d990d8729c/docker/logo.png" alt="Docker logo" width="200"><img src="$logoUrl" alt="Mod logo" height="200">

This Docker image contains the HLDS of the `$mod` game.
This Docker image contains the HLDS of the `$mod` game.

At [00:00 on Sunday](https://github.com/$githubRepository/blob/master/.github/workflows/CI.yml) using [GitHub Actions](https://github.com/$githubRepository/actions), all images are automatically [rebuilt and published](https://github.com/$githubRepository/blob/master/.github/workflows/CI.yml) to Docker Hub (https://hub.docker.com/u/$dockerUser).

## Usage
### Default fast start
```bash
docker run --rm -ti $dockerUser/$mod:public
```
This will start you `$mod` server with the default startup parameters specified in `CMD`.

### Custom launch params
```bash
docker run --rm -ti -p 27015:27015/udp $dockerUser/$mod:public ./hlds_run -game $mod +ip 0.0.0.0 -port 27015 +map crossfire
```

## About
### CMD
The default `CMD` for an image is:
```Dockerfile
CMD ["bash", "-c", "./hlds_run -game $mod +ip 0.0.0.0 -port 27016 +map $(head -n 1 ./${MOD}/mapcycle.txt)"]]
```

> [!NOTE]
> `$(head -n 1 ./${MOD}/mapcycle.txt)` - takes the first line (map name) from $mod/mapcycle.txt to enable the server.
These values allow you to execute a string of initialization commands before calling the game binary.

### WORKDIR
The default [work directory](https://docs.docker.com/reference/dockerfile/#workdir) for all the images is `/home/hlds` within which all of a game's files reside.

0 comments on commit 1aa4d0d

Please sign in to comment.