-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 881 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 881 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
32
33
34
35
36
37
# Makefile
# --- Configurable variables ---
IMAGE_NAME=ai-interview:main-latest
PORT=8501
ENV_FILE=.env
VENV_DIR=.venv
# ================================
# === Docker Commands ============
# ================================
build:
sudo docker build -t $(IMAGE_NAME) .
run:
sudo docker run --env-file $(ENV_FILE) -p $(PORT):$(PORT) $(IMAGE_NAME)
rebuild: clean build run
clean:
- sudo docker rm -f $(IMAGE_NAME)-container
# Optional: remove image
# - sudo docker rmi $(IMAGE_NAME)
# ================================
# === Helper =====================
# ================================
help:
@echo "Usage: make <target>"
@echo ""
@echo "Docker targets:"
@echo " build Build Docker image"
@echo " run Run Docker container with env"
@echo " rebuild Clean and rebuild Docker image"
@echo " clean Stop and remove Docker container"