From dd376aa20971341ac6be4355b9687eb746848ccc Mon Sep 17 00:00:00 2001 From: Nicolas Huray Date: Sat, 25 Nov 2017 09:10:39 -0500 Subject: [PATCH] Automatically pull the base image when building --- bin/fluentd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/fluentd b/bin/fluentd index 3e7cdde..f405095 100755 --- a/bin/fluentd +++ b/bin/fluentd @@ -95,11 +95,8 @@ build(){ build_image(){ test -n "$VERSION" || { error "Please set --version argument to define the version you want to debug"; exit 1;} - info "Pulling the base image..." - run_command="$(cat ${BASE_DIR}/versions/${VERSION}/Dockerfile | grep FROM | sed 's/^FROM \(.*\)$/docker pull \1/')" - ${run_command} info "Building image '$IMAGE:$VERSION' ..." - run_command="docker build -t $IMAGE:$VERSION -f $BASE_DIR/versions/$VERSION/Dockerfile ." + run_command="docker build --pull -t $IMAGE:$VERSION -f $BASE_DIR/versions/$VERSION/Dockerfile ." test "xtrue" = "x${verbose}" && debug "${run_command}" ${run_command} }