Using SHARE=. with the podman runtime fails
When using the podman
backend with cca-3world.yaml
and attempting to share the host's filesystem the following error is produced when the share is the same as the current working directory:
# cd /tmp/foo
# shrinkwrap -R podman run cca-3world.yaml --rtvar SHARE=.
Error: /tmp/foo: duplicate mount destination
RuntimePreparationFailed: Runtime preparation failed: failed to pull remote image docker.io/shrinkwraptool/base-slim:latest
The cause of this seems to be a change in tuxmake (this is with v1.23.2) where the function volume_opt
in PodmanRunTime
does the following:
def volume_opt(self, source, target, overlay=False):
v = f"--volume={source}:{target}"
if overlay:
v += ":O"
else:
v += ":z"
return v
Changing ":O" to ":z" 'fixes' the problem. This seems to be because tuxmake is adding the current working directory (with the overlay flag) and the SHARE adds the directory again without the flag.
Note that the instructions in cca-3world.yaml
happen to work because the current working directory there is a subset of ~/.shrinkwrap/package
which is already mounted within the container.