-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 775 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 775 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
# Variables
IMAGE_NAME := api-ichapter
CONTAINER_NAME := api-ichapter
PORT := 8082
# Build the Docker image
build:
docker build --platform linux/amd64 --no-cache -t $(IMAGE_NAME) .
build-dev:
docker build -f Dockerfile.dev --platform linux/amd64 -t $(IMAGE_NAME) .
# Run the Docker container
run:
docker run -d --name $(CONTAINER_NAME) -p $(PORT):$(PORT) --network=ichapter $(IMAGE_NAME)
# Stop the Docker container
stop:
docker stop $(CONTAINER_NAME)
# Remove the Docker container
rm:
docker rm $(CONTAINER_NAME)
# Remove the Docker image
rmi:
docker rmi $(IMAGE_NAME)
run-api:
docker run -d -p 8082:8082 --name api-ichapter --network ichapter api-ichapter
com-build:
docker-compose build
com-up:
docker-compose up -d