Merge pull request #3282 from dokku/3272-better-copy-from-image

feat: use create instead of run for faster and more reliable file copy from docker images
This commit is contained in:
Jose Diaz-Gonzalez
2018-10-07 18:59:46 -04:00
committed by GitHub
2 changed files with 1 additions and 2 deletions

View File

@@ -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

View File

@@ -5,7 +5,6 @@ ifneq ($(shell shellcheck --version > /dev/null 2>&1 ; echo $$?),0)
ifeq ($(SYSTEM),Darwin)
brew install shellcheck
else
sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 5072E1F5
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse'
sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean
sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck