You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Named container workaround fails when container copies data into it #52
This project currently sets up an empty directory as a workaround for a named container but that actually fails when the container tries to copy files into this directory. This can be seen when running a Wordpress container with a named volume.
I reproduced a related named-volume failure on container-compose 1.0.0 with container 1.0.0. The current workaround also looks stale now that container run -v data:/data ... supports native named volumes.
container-compose --file compose.yml up -d namedonly
Observed:
Warning: Volume source 'data' appears to be a named volume reference. The 'container' tool does not support named volume references in 'container run -v' command. Linking to /Users/romel/.containers/Volumes/feature-isolation/data instead.
...
failed to find target executable sh
The failed service was not left around for inspection.
By contrast, native container named volumes worked directly:
container run --rm -v data:/data busybox:latest sh -c 'echo direct > /data/direct.txt && cat /data/direct.txt'
container run --rm -v data:/data busybox:latest sh -c 'cat /data/direct.txt'
Output:
direct
direct
So I think the fix should now be to stop rewriting named volumes to ~/.containers/Volumes/... and pass named volume mounts through to container directly where possible.
container-compose up -d wordpress now starts and reaches running state cleanly — no more failed to change directory to '/var/www/html' crash. Matches the PR's own commit message ("Add named volume destination regression coverage"). Looks resolved.
This appears resolved by #119. Ryan validated the original WordPress named-volume repro against current main and confirmed it now starts cleanly without the /var/www/html failure. I do not have permission to close this issue because it was opened by another user, so a maintainer will need to close it as completed.
Activity
Mcrich23 commentedon Feb 4, 2026
I believe #42 fixes this
thromel commentedon Jun 25, 2026
I reproduced a related named-volume failure on
container-compose1.0.0 withcontainer1.0.0. The current workaround also looks stale now thatcontainer run -v data:/data ...supports native named volumes.Environment:
Repro:
Run:
Observed:
The failed service was not left around for inspection.
By contrast, native
containernamed volumes worked directly:Output:
So I think the fix should now be to stop rewriting named volumes to
~/.containers/Volumes/...and pass named volume mounts through tocontainerdirectly where possible.ryan106 commentedon Jul 2, 2026
This looks fixed by #119 too — I tested the exact WordPress repro from this issue against current
main:container-compose up -d wordpressnow starts and reachesrunningstate cleanly — no morefailed to change directory to '/var/www/html'crash. Matches the PR's own commit message ("Add named volume destination regression coverage"). Looks resolved.thromel commentedon Jul 2, 2026
This appears resolved by #119. Ryan validated the original WordPress named-volume repro against current main and confirmed it now starts cleanly without the /var/www/html failure. I do not have permission to close this issue because it was opened by another user, so a maintainer will need to close it as completed.