From 3e4f91a78d9e7fcd45fdb3812204bfcc22b90e7f Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Wed, 19 Apr 2017 03:00:09 +0100 Subject: [PATCH] Attempt to fix the clone command --- plugins/apps/subcommands/clone | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/apps/subcommands/clone b/plugins/apps/subcommands/clone index 829882c2c..fad859544 100755 --- a/plugins/apps/subcommands/clone +++ b/plugins/apps/subcommands/clone @@ -21,7 +21,9 @@ apps_clone_cmd() { local NEW_CACHE_DIR="$DOKKU_ROOT/$NEW_APP/cache" apps_create "$NEW_APP" - cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP" + cd "$DOKKU_ROOT/$OLD_APP/." + find * -not \( -name .cache \) | cpio -pvdmu "$DOKKU_ROOT/$NEW_APP" + cd - if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache