Browse Source

new: added ``docker_get_uid_gid`` for charms.

hostresources
Valentin Lab 6 years ago
parent
commit
cfd908b18d
  1. 11
      bin/compose-core

11
bin/compose-core

@ -1813,6 +1813,17 @@ docker_get_uid() {
}
export -f docker_get_uid
docker_get_uid_gid() {
local service="$1" user="$2" group="$3" uid
uid_gid=$(cached_cmd_on_base_image "$service" "id -u \"$user\"; id -g \"$group\"") || {
debug "Failed to query for '$user' uid in ${DARKYELLOW}$service${NORMAL} base image."
return 1
}
info "uid from ${DARKYELLOW}$service${NORMAL} for user '$user' is '$uid_gid'"
echo "$uid_gid"
}
export -f docker_get_uid_gid
logstdout() {
local name="$1"

Loading…
Cancel
Save