Browse Source

new: provide ``docker_get_uid`` for charms.

hostresources
Valentin Lab 6 years ago
parent
commit
ee12331c08
  1. 12
      bin/compose-core

12
bin/compose-core

@ -1685,6 +1685,18 @@ init-config-add() {
export -f init-config-add
docker_get_uid() {
local service="$1" user="$2" uid
uid=$(cached_cmd_on_base_image "$service" "id -u \"$user\"") || {
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'"
echo "$uid"
}
export -f docker_get_uid
logstdout() {
local name="$1"
sed -r 's%^%'"${name}"'> %g'

Loading…
Cancel
Save