2015-10-26 19:22:06 +00:00
|
|
|
TAG = 0.1
|
|
|
|
PREFIX = gcr.io/google_containers
|
|
|
|
|
2015-08-03 11:35:52 +00:00
|
|
|
all: push
|
|
|
|
|
2015-10-26 19:22:06 +00:00
|
|
|
container: image
|
2015-08-03 11:35:52 +00:00
|
|
|
|
2015-10-26 19:22:06 +00:00
|
|
|
image:
|
2015-08-03 11:35:52 +00:00
|
|
|
# Build new image and automatically tag it as latest
|
2015-10-26 19:22:06 +00:00
|
|
|
docker build -t $(PREFIX)/volume-rbd .
|
2015-08-03 11:35:52 +00:00
|
|
|
# Add the version tag to the latest image
|
2015-10-26 19:22:06 +00:00
|
|
|
docker tag $(PREFIX)/volume-rbd $(PREFIX)/volume-rbd:$(TAG)
|
2015-08-03 11:35:52 +00:00
|
|
|
|
|
|
|
block:
|
|
|
|
# Create block.tar.gz with ext2 block device with index.html inside.
|
|
|
|
# block.tar.gz is already available in git and users don't need to
|
|
|
|
# regenerate it, this target is here just for reference.
|
|
|
|
# Run as root!
|
|
|
|
./create_block.sh
|
|
|
|
|
2015-10-26 19:22:06 +00:00
|
|
|
push: image
|
2015-08-03 11:35:52 +00:00
|
|
|
# Push image tagged as latest to repository
|
2015-10-26 19:22:06 +00:00
|
|
|
gcloud docker push $(PREFIX)/volume-rbd
|
2015-08-03 11:35:52 +00:00
|
|
|
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
2015-10-26 19:22:06 +00:00
|
|
|
gcloud docker push $(PREFIX)/volume-rbd:$(TAG)
|
|
|
|
|
|
|
|
clean:
|