Skip to content

WIP Add mode and owner to docker volume

This patch extracts the mode and owner information from the docker volume listed and generates the correct run.json with proper mode and owner field set.

This is related to this post Running as a non-root Pantavisor container

Though the patch does work, I don't like it due to constant conversions between maps and the actual type. ** Need suggestions ** on how can this be improved.

The other end of this work is in Pantavisor. I still have to add for owner there but the permissions are there already.

Important Note fake root doesn't help since the tar options to persevere owner and permissions don't work,

--preserve --same-owner

For testing you can use the following mysql/src.json

{"#spec":"service-manifest-src@1","args":{},"config":{},"docker_digest":"registry.hub.docker.com/library/mysql@sha256:0ba38ea9c478d1e98b2f0bc0cee5a62345c9f06f78c4b48123bdc70d8d224686","docker_name":"registry.hub.docker.com/library/mysql","docker_source":"remote,local","docker_tag":"amd64","persistence":{},"template":"builtin-lxc-docker"}

NOTE For windows there's no syscall.Stat_t so some suggestions on how can that be handled opaquely would be nice. Currently builds for Linux only.

Signed-off-by: Pranay Kumar Srivastava pranay.srivastava@pantacor.com

Edited by Pranay Srivastava

Merge request reports