Skip to content

Commit

Permalink
Docs (examples): Simplify entrypoint syntax in `docs/samples/docker…
Browse files Browse the repository at this point in the history
…-compose/docker-compose.binary.yml` (#158)
  • Loading branch information
joeltimothyoh authored Nov 13, 2023
1 parent 0568cec commit b966f37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ The following are some guidelines on usage of the provided images with `docker`.

The default `ENTRYPOINT` for all game images is [`"bash", "-c"`](build/Dockerfile#L135), and the `CMD` is [`""`](build/Dockerfile#L136). These values allow a string of initialization commands to be executed before invocation of the game binary, similar to what is commonly achieved with `docker-entrypoint.sh`, or through [multi-line commands](docs/samples/docker-compose/docker-compose.bash-c.yml#L13-L16) in container manifests.

While the default values may not always be intuitive, they can be overridden with the `docker run` `--entrypoint` parameter, or through their respective [configuration options](docs/samples/docker-compose/docker-compose.binary.yml#L10-L12) in container manifests. Alternatively, they can be modified with custom built images.
While the default values may not always be intuitive, they can be overridden with the `docker run` `--entrypoint` parameter, or through their respective [configuration options](docs/samples/docker-compose/docker-compose.binary.yml#L10-L11) in container manifests. Alternatively, they can be modified with custom built images.

#### WORKDIR

Expand Down
21 changes: 7 additions & 14 deletions docs/samples/docker-compose/docker-compose.binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ services:
- 27015:27015/udp
stdin_open: true
tty: true
entrypoint:
- game/bin/linuxsteamrt64/cs2
entrypoint: game/bin/linuxsteamrt64/cs2
command: -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2

srcds-csgo:
Expand All @@ -18,8 +17,7 @@ services:
- 27015:27015/udp
stdin_open: true
tty: true
entrypoint:
- srcds_linux
entrypoint: srcds_linux
command: -game csgo -port 27015 +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2

srcds-hl2mp:
Expand All @@ -29,8 +27,7 @@ services:
- 27115:27115/udp
stdin_open: true
tty: true
entrypoint:
- srcds_linux
entrypoint: srcds_linux
command: -game hl2mp -port 27115 -maxplayers 16 +map dm_lockdown

srcds-left4dead2:
Expand All @@ -40,8 +37,7 @@ services:
- 27215:27215/udp
stdin_open: true
tty: true
entrypoint:
- srcds_linux
entrypoint: srcds_linux
command: -game left4dead2 -port 27215 +map "c2m1_highway coop"

hlds-cstrike:
Expand All @@ -50,8 +46,7 @@ services:
- 28015:28015/udp
stdin_open: true
tty: true
entrypoint:
- hlds_linux
entrypoint: hlds_linux
command: -game cstrike +port 28015 +maxplayers 10 +map de_dust2

hlds-czero:
Expand All @@ -60,8 +55,7 @@ services:
- 28115:28115/udp
stdin_open: true
tty: true
entrypoint:
- hlds_linux
entrypoint: hlds_linux
command: -game czero +port 28115 +maxplayers 10 +map de_dust2_cz

hlds-valve:
Expand All @@ -70,6 +64,5 @@ services:
- 28215:28215/udp
stdin_open: true
tty: true
entrypoint:
- hlds_linux
entrypoint: hlds_linux
command: -game valve +port 28215 +maxplayers 16 +map boot_camp

0 comments on commit b966f37

Please sign in to comment.