Make sure to remove the accelerated build container if it exists before trying to create a new one.

This commit is contained in:
Pagan Gazzard 2014-07-18 15:27:14 +01:00 committed by Pablo Carranza Vélez
parent 209d365891
commit d7abc9e8bd

View File

@ -37,6 +37,7 @@ else
docker pull $(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO):$(BUILDSTEP_VERSION)
endif
docker tag $(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO):$(BUILDSTEP_VERSION) resin/supervisor-base:latest
docker rm build-supervisor-latest 2> /dev/null || true
docker run --name build-supervisor-latest --volumes-from $(ACCELERATOR):ro -v `pwd`:/tmp/app resin/supervisor-base:latest bash -i -c ". /.env && cp -r /tmp/app /app && /build/builder"
docker commit build-supervisor-latest $(IMAGE) > /dev/null
docker rm build-supervisor-latest