uci-docker-build/core/opt/bin/map-host-id
David Kebler ca857a032a new: add core RUN step
refactored: Dockefile template
refactor: example and move src/ there a simple example
new: distros.csv holds table of valid distros, their images and install/update commands
refactor: various fixes and adjustment in response to above
refactor: help vastly improved and updated
2023-04-22 08:19:45 -07:00

12 lines
No EOL
316 B
Bash
Executable file

#!/bin/bash
vdirs=${1:-$VOLUME_DIRS}
if [[ $vdirs ]]; then
echo changing ownership of directories $vdirs
vgroup=host
[[ ! $USER = "root" && $USER ]]; vgroup=$USER
vmap=${HOST_MAP:-host:$vgroup}
echo to $vmap
declare usesudo
[[ ! $USER = "root" ]] && usesudo=sudo
$usesudo chown -R $vmap $vdirs
fi