forked from meltwater/docker-cleanup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 855 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
all: build
help:
@echo ""
@echo "-- Help Menu"
@echo ""
@echo " 1. make - build the image"
@echo " 2. make run - run docker-cleanup"
@echo " 3. make rm - destroy docker-cleanup container"
@echo " 4. make rebuild - rebuild docker-cleanup container"
@echo " 5. make restart - restart docker-cleanup container"
@echo " 6. make int - enter the docker-cleanup container on with a bash prompt"
default: build
build:
docker build --rm -t meltwater/docker-cleanup .
run:
docker run --env-file ./env.list --name docker-cleanup -v /var/run/docker.sock:/var/run/docker.sock:rw -v /var/lib/docker:/var/lib/docker:rw -d meltwater/docker-cleanup
int:
docker exec -it docker-cleanup bash
rm:
docker stop docker-cleanup
docker rm -f docker-cleanup
rebuild: rm build run
restart: rm run