test: add --no-cache flag when building docker images 65/6565/1
authorjose.lausuch <jose.lausuch@ericsson.com>
Wed, 13 Jan 2016 16:43:51 +0000 (17:43 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Wed, 13 Jan 2016 16:43:51 +0000 (17:43 +0100)
Sometimes, if the docker leftovers are not properly removed,
there is some cache that the build uses. This will force to
build from scratch without using any existing image (no cache)

Change-Id: Ifb19b2fc01da938cf46eb18d62a5877cf0a560e5
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
jjb/opnfv/opnfv-docker.sh

index a18ad0f..da62681 100644 (file)
@@ -91,7 +91,7 @@ echo "Tag version to be build and pushed: $DOCKER_TAG"
 # Start the build
 echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG..."
 
-docker build -t $DOCKER_REPO_NAME:$DOCKER_TAG .
+docker build -t --no-cache $DOCKER_REPO_NAME:$DOCKER_TAG .
 echo "Creating tag 'latest'..."
 docker tag $DOCKER_REPO_NAME:$DOCKER_TAG $DOCKER_REPO_NAME:latest