Container glow-up: know your build, know when to pull - #742
Open
cocopuff2u wants to merge 4 commits into
Open
Conversation
# Conflicts: # .github/container/Dockerfile # .github/container/entrypoint.sh # .github/workflows/container-publish.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The container's startup update check only printed something when an update was available, and even then it didn't show any version info. If you were up to date or the check failed (offline, registry unreachable), you got nothing, so there was no way to know if the check even ran. There was also no way to see which version or build you were on from inside the container.
This PR adds three clear banner states, a
mscp_checkcommand you can run anytime, an opt-out variable, and exit codes for scripting.Before
The only output you would ever see:
After
When an update is available:
When the container is up to date (previously silent):
When offline or the registry is unreachable (previously silent):
Details
mscp_checkcan be run anytime inside the container to see which build you're on and whether it's up to date. It's also what runs on startup. It exits 1 when an update is available and 0 otherwise.MSCP_SKIP_UPDATE_CHECK=1to skip the check on startup.build 34 (11b5896, built 2026-07-16)instead of just a commit SHA.Testing
Tested against real published ghcr.io images. An old build 33 image shows the update banner and exits 1. The latest image shows up to date and exits 0. Running with
--network noneshows the offline notice within a few seconds. The skip variable results in no banner. A container with no build metadata stays quiet on startup andmscp_checkexplains there is nothing to compare against.