Skip to content

Commit

Permalink
Add ability to ping and change timezone during container deployment #57
Browse files Browse the repository at this point in the history
This adds 2 packages during image build:
* iputils-ping: Allows to ping IPs to validate internet connection
* tzdata: Allows to change timezone, so the logs time/date match what the user defines, instead of being always UTC
  • Loading branch information
thiagogpa authored Jan 20, 2023
1 parent f5948f0 commit dd8c040
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ jobs:
- name: Test Run the Docker Image
if: ${{ success() && matrix.system == 'docker' }}
continue-on-error: true
timeout-minutes: 7
timeout-minutes: 10
run: |
# Start a timed shutdown signal
(sleep 330 && docker exec \
(sleep 360 && docker exec \
zomboid-dedicated-server bash -c \
"rcon -a $(cat ZomboidConfig/ip.txt):\${RCON_PORT} -p \${RCON_PASSWORD} quit") &
Expand Down Expand Up @@ -131,10 +131,10 @@ jobs:
- name: Test Run the Docker-Compose Image
if: ${{ success() && matrix.system == 'docker-compose' }}
continue-on-error: true
timeout-minutes: 7
timeout-minutes: 10
run: |
# Start a timed shutdown signal
(sleep 330 && docker exec \
(sleep 360 && docker exec \
zomboid-dedicated-server bash -c \
"rcon -a $(cat ZomboidConfig/ip.txt):\${RCON_PORT} -p \${RCON_PASSWORD} quit") &
Expand All @@ -156,10 +156,10 @@ jobs:
- name: Test Run the Podman Image
if: ${{ success() && matrix.system == 'podman' }}
continue-on-error: true
timeout-minutes: 7
timeout-minutes: 10
run: |
# Start a timed shutdown signal
(sleep 330 && podman exec \
(sleep 360 && podman exec \
zomboid-dedicated-server bash -c \
"rcon -a $(cat ZomboidConfig/ip.txt):\${RCON_PORT} -p \${RCON_PASSWORD} quit") &
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ recommended for ease of configuration.
| `MAP_NAMES` | Map Names (e.g. North;South) | map1;map2;map3 | Muldraugh, KY |
| `MAX_RAM` | Maximum amount of RAM to be used | ([0-9]+)m | 4096m |
| `STEAM_VAC` | Use Steam VAC anti-cheat | (true|false) | true |
| `TZ` | Set the timezone for the container | [A-Z]+ | UTC |
| `USE_STEAM` | Create a Steam Server, or a Non-Steam Server | (true|false) | true |

### Config file environment variables
Expand Down Expand Up @@ -237,6 +238,7 @@ The following are instructions for running the server using the Docker image.
[--env=SERVER_NAME=<value>] \
[--env=SERVER_PASSWORD=<value>] \
[--env=STEAM_VAC=<value>] \
[--env=TZ=<value>] \
[--env=USE_STEAM=<value>] \
docker.io/renegademaster/zomboid-dedicated-server[:<tagname>]
```
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ services:
- "STEAM_VAC=true"
- "UDP_PORT=16262"
- "USE_STEAM=true"
- "TZ=UTC"
ports:
- target: 16261
published: 16261
Expand Down
2 changes: 1 addition & 1 deletion docker/zomboid-dedicated-server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ COPY src /home/steam/

# Install Python, and take ownership of rcon binary
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-minimal \
python3-minimal iputils-ping tzdata \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit dd8c040

Please sign in to comment.