-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
33 lines (23 loc) · 886 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
.SILENT:
# Containerized workflow (supporting Podman and Docker)
_IF_PODMAN := $(shell command -v podman 2> /dev/null)
define container-tool
$(if $(_IF_PODMAN), podman, docker)
endef
IMAGE_TAG = komodo-defi-proxy
CONTAINER_NAME = komodo-defi-proxy
container-build:
@echo Building production image
$(call container-tool) build --build-arg --no-cache -t $(IMAGE_TAG) -f Containerfile
container-start:
$(call container-tool) run --name $(CONTAINER_NAME) --network host $(IMAGE_TAG)
container-silent-start:
$(call container-tool) run --detach --name $(CONTAINER_NAME) --network host $(IMAGE_TAG)
container-stop:
$(call container-tool) stop --time 1 $(CONTAINER_NAME)
$(call container-tool) rm $(CONTAINER_NAME)
container-restart:
$(MAKE) stop-container && $(MAKE) start-container
container-logs:
$(call container-tool) logs --follow $(CONTAINER_NAME)
.PHONY: container-*