Makefile 381 B

123456789101112
  1. IMAGE_NAME = gearmand-testing
  2. IMAGE_BASE = fedora
  3. IMAGE_VERSION = 36
  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