Renegade-Master / zomboid-dedicated-server

Linux based Docker image containing a Dedicated Server for Project Zomboid.
https://hub.docker.com/r/renegademaster/zomboid-dedicated-server
Other
173 stars 59 forks source link

Add ability to ping and change timezone during container deployment #57

Closed thiagogpa closed 1 year ago

thiagogpa commented 1 year ago

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

Renegade-Master commented 1 year ago

Thanks for the contribution!

The TZ variable is a good idea. Why the iputils-ping though? Surely whatever system this is running on already has a ping utility?

thiagogpa commented 1 year ago

Thanks for the contribution!

The TZ variable is a good idea. Why the iputils-ping though? Surely whatever system this is running on already has a ping utility?

Actually, it doesn't, the base image you are using,"docker.io/renegademaster/steamcmd-minimal:1.1.2", has nothing but steam installed on it:

image

Since you are the owner of that image you could just change that one instead of this repository if you prefer.

Renegade-Master commented 1 year ago

Thanks for the contribution! The TZ variable is a good idea. Why the iputils-ping though? Surely whatever system this is running on already has a ping utility?

Actually, it doesn't, the base image you are using,"docker.io/renegademaster/steamcmd-minimal:1.1.2", has nothing but steam installed on it:

image

Since you are the owner of that image you could just change that one instead of this repository if you prefer.

Sorry, I didn't mean the base image. I meant that the host these containers are running on surely has a similar utility.

Still though, the package is probably small enough. Do you happen to know how much this has increased the image size by?

Renegade-Master commented 1 year ago

And to be honest, this does seem like something that would be more beneficial to apply to the base image instead of this layer. However we can add it here for now, and remove it again if I decide to move it up.

thiagogpa commented 1 year ago

Thanks for the contribution! The TZ variable is a good idea. Why the iputils-ping though? Surely whatever system this is running on already has a ping utility?

Actually, it doesn't, the base image you are using,"docker.io/renegademaster/steamcmd-minimal:1.1.2", has nothing but steam installed on it: image Since you are the owner of that image you could just change that one instead of this repository if you prefer.

Sorry, I didn't mean the base image. I meant that the host these containers are running on surely has a similar utility.

Still though, the package is probably small enough. Do you happen to know how much this has increased the image size by?

Its seems like around 116kb only

thiagogpa commented 1 year ago

I noticed the podman server exit didnt execute, causing the test to fail.

Not sure why, i've never used podman before

**I think the issue might be the sleep 330 on the Podman test run. It took longer than that to be done with all the server install, may I increase the time so the command is performed maybe at 8 min given it took almost that last time it executed ?

Renegade-Master commented 1 year ago

Things looking good! I'll check back after work today.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Renegade-Master commented 1 year ago

I did some investigating and over two runs, this was the times taken:

Your increased timeouts: Type Start Ready Quit Stopped Total Start - Ready Ready - Quit
Docker 20:46:46 20:51:31 20:54:46 20:54:54 00:08:08 00:04:45 00:03:15
Docker-Compose 20:46:46 20:51:22 20:54:46 20:54:54 00:08:08 00:04:36 00:03:24
Podman 20:46:41 20:51:45 20:54:41 20:54:50 00:08:09 00:05:04 00:02:56
My reduction of your increased timeouts (still higher than before this PR): Type Start Ready Quit Stopped Total Start - Ready Ready - Quit
Docker 21:58:27 22:03:09 22:04:27 22:04:35 00:06:08 00:04:42 00:01:18
Docker-Compose 21:58:33 22:03:21 22:04:33 22:04:41 00:06:08 00:06:08 00:01:12
Podman 21:58:32 22:03:34 22:04:32 22:04:40 00:06:08 00:06:08 00:00:58

Also, now that this is merged, I have created a new image version: v2.4.0

thiagogpa commented 1 year ago

Awesome loved to contribute!