-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (35 loc) · 1.36 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
44
45
46
# Ben Payne
# Physics Derivation Graph
# https://allofphysics.com
# todo: docker kill $(docker ps -q); make up
up_monitor:
if (! docker stats --no-stream ); then open /Applications/Docker.app; while (! docker stats --no-stream ); do echo "Waiting for Docker to launch..."; sleep 1; done; fi;
docker ps
if [ `docker ps | wc -l` -gt 1 ]; then \
docker kill $$(docker ps -q); \
fi
docker ps
docker run -it --rm -v `pwd`:/scratch allofphysicscom-flask /bin/bash -c 'for filename in /scratch/flask/*.py; do echo $$filename; done | xargs black'
docker compose up --build --force-recreate --remove-orphans
up:
if (! docker stats --no-stream ); then open /Applications/Docker.app; while (! docker stats --no-stream ); do echo "Waiting for Docker to launch..."; sleep 1; done; fi;
docker ps
if [ `docker ps | wc -l` -gt 1 ]; then \
docker kill $$(docker ps -q); \
fi
docker ps
docker run -it --rm -v `pwd`:/scratch allofphysicscom-flask /bin/bash -c 'for filename in /scratch/flask/*.py; do echo $$filename; done | xargs black'
docker compose up --build --force-recreate --remove-orphans --detach
down:
docker compose down
kill:
docker ps
docker kill $$(docker ps -q)
# This will remove:
# - all stopped containers
# - all networks not used by at least one container
# - all dangling images
# - unused build cache
clear:
docker system prune
# EOF