-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 749 Bytes
/
Makefile
File metadata and controls
32 lines (27 loc) · 749 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
DOCKER_COMPOSE= docker-compose
DOCKER = docker
CONTAINER_NAME= registry
all: status
status:
@$(DOCKER) stats --all --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"
images:
@$(DOCKER) images --format "{{.Repository}}:{{.Tag}}"| sort
ls:
@$(DOCKER) images --format "{{.ID}}: {{.Repository}}"
size:
@$(DOCKER) images --format "{{.Size}}\t: {{.Repository}}"
tags:
@$(DOCKER) images --format "{{.Tag}}\t: {{.Repository}}"| sort -t ':' -k2 -n
net:
@$(DOCKER) network ls
rm-network:
@$(DOCKER) network ls| awk '$$2 !~ "(bridge|host|none)" {print "docker network rm " $$1}' | sed '1d'
ps:
$(DOCKER) ps -a
up:
$(DOCKER_COMPOSE) up -d
stop:
$(DOCKER) stop $(CONTAINER_NAME)
rm:
$(DOCKER) rm -v $(CONTAINER_NAME)
clean: stop rm