From 7414114e3cf877cb29517c99ee11b2b30ede0132 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 10 Dec 2014 17:20:55 +0800 Subject: [PATCH] fix: [docker-builder] using docker-update fixes the vanishing entrypoint issue. --- .../src/usr/local/bin/hook-docker-update | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/precise/docker-builder/src/usr/local/bin/hook-docker-update b/precise/docker-builder/src/usr/local/bin/hook-docker-update index 80d744ab..f4b7316a 100755 --- a/precise/docker-builder/src/usr/local/bin/hook-docker-update +++ b/precise/docker-builder/src/usr/local/bin/hook-docker-update @@ -15,7 +15,6 @@ include pretty usage="$exname COMPONENT MASTER_IMAGE_NAME BRANCH UPDATED_IMAGE_NAME" - COMPONENT_NAME="$1" MASTER_IMAGE_NAME="$2" BRANCH="$3" @@ -95,30 +94,11 @@ fi # #echo "Pulling $MASTER_IMAGE_NAME" #docker pull "$MASTER_IMAGE_NAME" || exit 1 -container_id=$( - docker run -d \ - -v $tmpdir_changes:/mnt/changes \ - --entrypoint '/bin/bash' \ - "$MASTER_IMAGE_NAME" \ - -c " - mkdir -p /srv/app/{root,changes} - cp -a /mnt/changes /srv/app/changes/0000 - ls /srv/app/changes/0000 - ") -if [ "$?" != 0 ]; then - echo "Failed to call docker run..." - exit 1 -fi -if [ "$(docker wait "$container_id")" != "0" ]; then - echo "Copy of changes to docker images failed !" - echo "Log of container:" - docker logs "$container_id" - exit 1 -fi -docker commit --author "$exname" \ - --message "Automatic Updater" \ - "$container_id" \ - "$UPDATED_IMAGE_NAME" +cat <