Skip to content

Conversation

jonasbardino
Copy link
Contributor

@jonasbardino jonasbardino commented Oct 14, 2025

Adds a new /hotfixes folder in containers and ${PERSISTENT_ROOT}/hotfixes with scripts and patches in it on the host.
Adds a simple script to help apply hotfixes from a folder and installs it in /app/apply-hotfixes.sh in all containers.
All containers bind-mount ${PERSISTENT_ROOT}/hotfixes on /hotfixes and docker-entry.sh is extended to first run /app/apply-hotfixes.sh on the mounted /hotfixes. It traverses it and sequentially applies any patches found in /hotfix/patches/ and runs any scripts found in /hotfix/scripts/ before proceeding with the usual container execution to effectively hot-fix everything inside the container before running.

It is tested to work in the development env with a couple of simple helloworld.sh and helloworld2.sh scripts plus a minimal motd.patch . For production use it is recommended to instead use a numbering prefix for explicit ordering in order to assure patches and scripts are run in the expected order. E.g. 00-initial-changes.patch , ..., 42-fix-something-else.patch , ..., 99-final-wrap-up.patch and similar for the scripts.

Executed scripts and applied patches get registered in /tmp in order to skip them and only run newly added ones if apply-hotfixes.sh is re-run inside the containers.

NB: scripts need to be executable and patches need to be made with absolute path so that patch -d / -p 0 < PATCH will apply them cleanly without interaction.

Adds a new `/hotfixes` folder in containers and `${PERSISTENT_ROOT}/hotfixes`
with `scripts` and `patches` in it on the host.
Adds a simple script to help apply hotfixes from a folder and installs it in
`/app/apply-hotfixes.sh` in all containers.
All containers mount `${PERSISTENT_ROOT}/hotfixes` on `/hotfixes` and
`docker-entry.sh` is extended to first run `/app/apply-hotfixes.sh`.
It traverses `/hotfixes` and sequentially applies any patches found in
`/hotfix/patches` and runs any scripts found in `/hotfix/scripts` before
proceeding with the usual container execution to effectively hotfix everything
inside the container before running.
@jonasbardino jonasbardino self-assigned this Oct 14, 2025
@jonasbardino jonasbardino added the enhancement New feature or request label Oct 14, 2025
@jonasbardino jonasbardino marked this pull request as ready for review October 14, 2025 14:40
@jonasbardino jonasbardino requested a review from a team October 14, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant