-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 1.1 KB
/
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
CONTAINER_REGISTRY:="local-dev"
VERSION:="latest"
TAG:=$CONTAINER_REGISTRY/pb-api:$VERSION
DOCKERFILE:=Dockerfile
.PHONY: build # build image using docker-compose with tag
build:
@echo "Building images with tag: $TAG"
docker-compose build
.PHONY: up # run container
up:
@echo "Running images with tag: $TAG"
docker-compose up --build
.PHONY: run # run container in interactive mode using docker-compose with tag
run:
@echo "Running container with tag: $TAG"
docker-compose run --rm pb-rest-api
.PHONY: down # stop container using docker-compose
down:
@echo "Stopping container"
docker-compose down
.PHONY: destroy # destroy container using docker-compose
destroy:
@echo "Destroying container"
docker-compose down --rmi all
.PHONY: train # run training script using docker-compose with tag
train:
@echo "Running training script"
docker-compose run --rm pb-train
.PHONY: logs # show logs using docker-compose
logs:
@echo "Showing logs"
docker-compose logs pb-rest-api
.PHONY: help # shows available commands
help:
@echo "\nAvailable commands:\n\n $(shell sed -n 's/^.PHONY:\(.*\)/ *\1\\n/p' Makefile)"