From 66948b9de4eb440572f9f9b99853c6e606a12d1c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 6 Oct 2018 19:03:35 -0400 Subject: [PATCH] feat: use create instead of run for faster and more reliable file copy from docker images Closes #3272 --- plugins/common/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common/functions b/plugins/common/functions index 562ee1310..cb0a7a2af 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -325,7 +325,7 @@ copy_from_image() { [[ -z "$WORKDIR" ]] && local WORKDIR=/app local SRC_FILE="$WORKDIR/$SRC_FILE" fi - local CID=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -d "$IMAGE" bash) + local CID=$(docker create "$DOKKU_GLOBAL_RUN_ARGS" "$IMAGE") docker cp "$CID:$SRC_FILE" "$DST_DIR" docker rm -f "$CID" &> /dev/null else