-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (37 loc) · 912 Bytes
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
# Define the image name
IMAGE_NAME = CheerUpApp
DOCKER_USERNAME = jahnavimaddhuri
# Build the Docker image
build:
docker build -t $(IMAGE_NAME) .
# Run Docker container
run:
docker run -p 5000:5000 $(IMAGE_NAME)
# Remove Docker image
clean:
docker rmi $(IMAGE_NAME)
image_show:
docker images
container_show:
docker ps
push:
docker login
docker tag $(IMAGE_NAME) $(DOCKER_USERNAME)/$(IMAGE_NAME)
docker push $(DOCKER_USERNAME)/$(IMAGE_NAME):latest
login:
docker login -u ${DOCKER_USERNAME}
install:
pip install --upgrade pip &&\
pip install -r requirements.txt
test:
python -m pytest -vv --cov=app test_*.py
format:
black *.py
lint:
#disable comment to test speed
#pylint --disable=R,C --ignore-patterns=test_.*?py *.py mylib/*.py
#ruff linting is 10-100X faster than pylint
ruff check *.py
container-lint:
docker run --rm -i hadolint/hadolint < Dockerfile
refactor: format lint