Skip to content

Commit

Permalink
Improved the local build process.
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <[email protected]>
  • Loading branch information
Jack12816 committed Oct 21, 2024
1 parent e57475b commit 753307f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions 3.7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ CANONICAL_NAME ?= kafka
IMAGE_NAME ?= hausgold/$(CANONICAL_NAME)
IMAGE_REF ?= 3.7
IMAGE_URI := $(IMAGE_NAME):$(IMAGE_REF)
TEST_CONTAINER_NAME ?= $(CANONICAL_NAME)-test

# Host binaries
CURL ?= curl
Expand All @@ -33,7 +32,7 @@ define retry
endef

all:
# mDNS enabled wurstmeister/kafka-docker
# mDNS enabled apache/kafka
#
# build Build a development snapshot of the image
# test Test the built Docker image
Expand All @@ -44,7 +43,7 @@ all:

build: clean
# Build the Docker image
@$(TIME) $(DOCKER) build --no-cache -t "$(IMAGE_NAME):dev" .
@$(TIME) $(DOCKER) build --no-cache -t "$(IMAGE_URI)" .

test:
# Test the built Docker image
Expand All @@ -53,13 +52,12 @@ test:

publish:
# Push the new Docker image to the registry
@$(DOCKER) tag "$(IMAGE_NAME):dev" "$(IMAGE_URI)"
@$(call retry,$(TIME) $(SHELL) -c '$(DOCKER) push $(IMAGE_URI)')

shell:
# Start an individual test session of the image
@$(DOCKER) run --rm -it "$(IMAGE_NAME):dev" bash
@$(DOCKER) run --rm -it "$(IMAGE_URI)" bash

clean:
# Clean the current development snapshot
@$(DOCKER) rmi --force "$(IMAGE_NAME):dev" || true
@$(DOCKER) rmi --force "$(IMAGE_URI)" || true

0 comments on commit 753307f

Please sign in to comment.