changeset 120:37e100fd30ef

docker (liberiva_cont): ownership is fixed on "config" command as "docker cp" use root:root as owner of copied file on container
author Goffi <goffi@goffi.org>
date Wed, 09 Mar 2016 10:11:08 +0100
parents 5d2eb2f61dc8
children d493fe1cf095
files docker/libervia_cont.sh
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/docker/libervia_cont.sh	Tue Mar 08 18:36:14 2016 +0100
+++ b/docker/libervia_cont.sh	Wed Mar 09 10:11:08 2016 +0100
@@ -446,6 +446,11 @@
                 eprintf "Old Docker version detected, using workaround, please update!\n"
                 docker run --rm $DK_VOLUME -v "$TMP_DIR:/tmp_config" $MAINT_CONT /bin/cp -f "/tmp_config/$HOST_CONF_FILE" "$CONT_CONF_FILE"
             fi
+            # "docker cp" copy file on container as root, if an option is available later to change this behaviour,
+            # the following operation could be removed
+            printf "ownership fix..."
+            docker run --rm $DK_VOLUME $MAINT_CONT /bin/chown 1000:1000 "$CONT_CONF_FILE"
+            printf "done\n"
         fi
         rm -rf "$TMP_DIR"
         ;;