Makefile 412 B

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