mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Since containers managed by docker runs as root, files created in bind mounted volumes will be owned by root:root. This is a problem for files generated during test execution, as the calling user does not have permission to remove them. Therefore, add a wrapper entrypoint that hooks up an exit handler that will fixup the permissions before exiting the container.
15 lines
158 B
Bash
Executable File
15 lines
158 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
fixup_owner()
|
|
{
|
|
for dir in $HOST_CHOWN_PATH; do
|
|
chown -R $HOST_CHOWN_UID:$HOST_CHOWN_GID $dir
|
|
done
|
|
}
|
|
|
|
trap fixup_owner EXIT
|
|
|
|
"$@"
|