Merge pull request #2730 from weyert/bugfix/2711

Fix ticket #2711
This commit is contained in:
Jose Diaz-Gonzalez
2017-04-20 15:19:37 -06:00
committed by GitHub

View File

@@ -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"
pushd "$DOKKU_ROOT/$OLD_APP/." > /dev/null
find ./* -not \( -name .cache \) | cpio -pvdmu "$DOKKU_ROOT/$NEW_APP"
popd > /dev/null
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