Merge "Uniquely identify builds to prevent race"
This commit is contained in:
@@ -19,11 +19,14 @@ cd ../../
|
|||||||
docker build -t oemdocker .
|
docker build -t oemdocker .
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
# Create a UUID to identify the build
|
||||||
|
CONTAINER_UUID=`uuidgen`
|
||||||
|
|
||||||
# Export the oemdocker repository to a tarball so it can be embedded in CoreOS
|
# Export the oemdocker repository to a tarball so it can be embedded in CoreOS
|
||||||
# TODO: Investigate running a container and using "export" to flatten the
|
# TODO: Investigate running a container and using "export" to flatten the
|
||||||
# image to shrink the CoreOS fs size. This will also require run.sh to
|
# image to shrink the CoreOS fs size. This will also require run.sh to
|
||||||
# use docker import instead of docker load as well.
|
# use docker import instead of docker load as well.
|
||||||
docker run oemdocker echo PICKME
|
docker run oemdocker echo $CONTAINER_UUID
|
||||||
CONTAINER=`docker ps -a |grep PICKME|awk '{print $1}'|head -n1`
|
CONTAINER=`docker ps -a --no-trunc |grep $CONTAINER_UUID|awk '{print $1}'|head -n1`
|
||||||
echo $CONTAINER
|
echo $CONTAINER
|
||||||
docker export $CONTAINER | gzip > ${OUTPUT_FILE}
|
docker export $CONTAINER | gzip > ${OUTPUT_FILE}
|
||||||
|
|||||||
Reference in New Issue
Block a user