Makefile 384 B

123456789101112
  1. IMAGE_NAME = gearmand-testing
  2. IMAGE_BASE = ubuntu
  3. IMAGE_VERSION = 16.04
  4. IMAGE_TAG = $(IMAGE_NAME)/${IMAGE_BASE}:$(IMAGE_VERSION)
  5. USE_CACHE ?=
  6. image:
  7. @echo "Building Docker image ${IMAGE_TAG}..."
  8. -docker build $(USE_CACHE) --network=host -t $(IMAGE_TAG) . && (docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi)
  9. image-no-cache:
  10. $(MAKE) -e USE_CACHE=--no-cache