Skip to content

Commit

Permalink
Automatically pull the base image when building
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Huray committed Nov 25, 2017
1 parent 82f5caa commit dd376aa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bin/fluentd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down

0 comments on commit dd376aa

Please sign in to comment.