-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (26 loc) · 815 Bytes
/
Makefile
File metadata and controls
31 lines (26 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
IMAGE_NAME ?= ghcr.io/compspec/fractale
IMAGE_TAG ?= flux-validator
FULL_IMAGE_NAME = $(IMAGE_NAME):$(IMAGE_TAG)
DOCKERFILE_PATH = Dockerfile
BUILD_CONTEXT = .
# Default target: builds the Docker image
all: build
# Build the Docker image
build:
@echo "Building Docker image $(FULL_IMAGE_NAME)..."
docker build \
-f $(DOCKERFILE_PATH) \
-t $(FULL_IMAGE_NAME) \
-f ./docker/flux-validator/Dockerfile \
.
@echo "Docker image $(FULL_IMAGE_NAME) built successfully."
# Push the docker image
push:
@echo "Pushing image $(FULL_IMAGE_NAME)..."
docker push $(FULL_IMAGE_NAME)
# Remove the image (clean with rmi)
clean:
@echo "Removing Docker image $(FULL_IMAGE_NAME)..."
docker rmi $(FULL_IMAGE_NAME) || true
@echo "Docker image $(FULL_IMAGE_NAME) removed (if it existed)."
.PHONY: all build push clean