rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
2.37k stars 96 forks source link

misc: Use tini as container entrypoint #1272

Closed adamantike closed 3 weeks ago

adamantike commented 3 weeks ago

Use tini [1] as the container entrypoint to ensure that the container process is properly reaped when the container is stopped.

This is needed as the main container command is a shell script.

A simple way to test this change is to:

  1. Build the container image and run it using docker compose up.
  2. Within the same terminal, stop the container using Ctrl+C.
  3. Verify that the container is properly stopped right away.

Without tini, the container takes a few seconds to stop, and it makes one CPU core to be used at 100% during that time.

[1] https://github.com/krallin/tini