Add versioned system dir, /opt/dockside.img staging, and rsync entrypoint upgrade#30
Open
Add versioned system dir, /opt/dockside.img staging, and rsync entrypoint upgrade#30
Conversation
…oint upgrade - Dockerfile: build /opt/dockside content at /opt/dockside.img (staging area) rather than directly in the named volume path. A final RUN moves the populated /opt/dockside tree to /opt/dockside.img, leaving /opt/dockside empty for the named volume. This allows the entrypoint rsync to bring the volume up to date on every container start, enabling single-step upgrades. - Dockerfile (system stage): convert system/latest/ from a plain directory to a versioned directory named after DOCKSIDE_VERSION (e.g. system/3.2.0/), with system/latest as a symlink — matching the pattern used for IDEs. DOCKSIDE_VERSION is a new build ARG auto-detected from git tags in build.sh. - entrypoint.sh: add rsync step at container start that syncs /opt/dockside.img/ → /opt/dockside/ using --archive without --delete for ide/ (preserving old IDE versions that running devtainers may still use), and --archive --delete for bin/, system/, and all other non-IDE paths. - launch.sh: resolve IDE_PATH and IIDE_PATH via busybox readlink -f before use, pinning running devtainers to a specific versioned directory and making them unaffected by a subsequent latest symlink update during upgrade. https://claude.ai/code/session_011v8HBRuJBorZTbQLXY7xKA
rsync is unnecessary here: cp -a handles symlinks, permissions, and timestamps identically, and is always available from coreutils with no extra package needed. The cp -a loop mirrors the pattern already used in the (now defunct) upgrade script: iterate over version dirs, skip if already present, copy if new. The latest symlinks and bin/ are always overwritten as they are small and safe. https://claude.ai/code/session_011v8HBRuJBorZTbQLXY7xKA
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.
Dockerfile: build /opt/dockside content at /opt/dockside.img (staging area)
rather than directly in the named volume path. A final RUN moves the
populated /opt/dockside tree to /opt/dockside.img, leaving /opt/dockside
empty for the named volume. This allows the entrypoint rsync to bring
the volume up to date on every container start, enabling single-step upgrades.
Dockerfile (system stage): convert system/latest/ from a plain directory
to a versioned directory named after DOCKSIDE_VERSION (e.g. system/3.2.0/),
with system/latest as a symlink — matching the pattern used for IDEs.
DOCKSIDE_VERSION is a new build ARG auto-detected from git tags in build.sh.
entrypoint.sh: add rsync step at container start that syncs
/opt/dockside.img/ → /opt/dockside/ using --archive without --delete for
ide/ (preserving old IDE versions that running devtainers may still use),
and --archive --delete for bin/, system/, and all other non-IDE paths.
launch.sh: resolve IDE_PATH and IIDE_PATH via busybox readlink -f before
use, pinning running devtainers to a specific versioned directory and
making them unaffected by a subsequent latest symlink update during upgrade.
https://claude.ai/code/session_011v8HBRuJBorZTbQLXY7xKA