fix(docker): use git commit comparison for volume update detection#1594
Open
GratefulDave wants to merge 1 commit into
Open
fix(docker): use git commit comparison for volume update detection#1594GratefulDave wants to merge 1 commit into
GratefulDave wants to merge 1 commit into
Conversation
Replace the naive 'file exists' check with git commit hash comparison so that Docker image updates automatically sync code to the mounted volume. Previously, once /a0/run_ui.py existed the copy was skipped forever, leaving stale code on the volume after image upgrades. Now: - First run (empty volume): initial copy (unchanged behavior) - Image commit != volume commit: overwrite code files while preserving user data not present in the source - Commits match: skip copy (fast startup)
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
copy_A0.shwith git commit hash comparison so Docker image updates automatically sync code to the mounted volume.Problem
Previously, once
/a0/run_ui.pyexisted the copy was skipped forever, leaving stale code on the volume after image upgrades. Users had to manually delete the volume to get updated code.Changes
docker/run/fs/ins/copy_A0.sh: