A copied tree meets the image where the two first differ #10

Manually merged
mi merged 1 commits from archive-merge-deeper into main 2026-09-11 10:20:38 +02:00
Owner

PUT /archive decided once, at the top level of the archive: a directory
the image filled was refused, because binding it would hide what was
inside. That was the right worry in the wrong place. Docker's clients put
the whole path in the tar entries, so MariaDBContainer copying its
configuration to /etc/mysql/conf.d arrives as a top-level "etc" — refused,
and the container never started at all.

The rule now descends instead of giving up: bind where the image has
nothing, descend where it has a directory, bind the file where it has a
file. The two trees meet at whatever depth they first differ, which is
docker's merge; mariadb's config binds one file four levels down and
/etc is left alone. The refusal that said werkdock "would have to hide
them" is gone with it, because there is no longer a case where it would.

Found by MariaDBContainer, which is now a test in werkprobe rather than
something I ran once by hand.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

PUT /archive decided once, at the top level of the archive: a directory the image filled was refused, because binding it would hide what was inside. That was the right worry in the wrong place. Docker's clients put the whole path in the tar entries, so MariaDBContainer copying its configuration to /etc/mysql/conf.d arrives as a top-level "etc" — refused, and the container never started at all. The rule now descends instead of giving up: bind where the image has nothing, descend where it has a directory, bind the file where it has a file. The two trees meet at whatever depth they first differ, which is docker's merge; mariadb's config binds one file four levels down and /etc is left alone. The refusal that said werkdock "would have to hide them" is gone with it, because there is no longer a case where it would. Found by MariaDBContainer, which is now a test in werkprobe rather than something I ran once by hand. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mi added 1 commit 2026-09-11 10:20:34 +02:00
PUT /archive decided once, at the top level of the archive: a directory
the image filled was refused, because binding it would hide what was
inside. That was the right worry in the wrong place. Docker's clients put
the whole path in the tar entries, so MariaDBContainer copying its
configuration to /etc/mysql/conf.d arrives as a top-level "etc" — refused,
and the container never started at all.

The rule now descends instead of giving up: bind where the image has
nothing, descend where it has a directory, bind the file where it has a
file. The two trees meet at whatever depth they first differ, which is
docker's merge; mariadb's config binds one file four levels down and
/etc is left alone. The refusal that said werkdock "would have to hide
them" is gone with it, because there is no longer a case where it would.

Found by MariaDBContainer, which is now a test in werkprobe rather than
something I ran once by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mi manually merged commit 1e4c24d408 into main 2026-09-11 10:20:38 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkdock#10