Add a `dev` target which adds a convenient developer loop which
rebuilds and reruns the daemon after a SIGINT is received.
It can be exited by sending SIGINT (Ctrl+C) a couple times.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| ... | ... |
@@ -212,6 +212,10 @@ build: validate-bind-dir bundles |
| 212 | 212 |
shell: build ## start a shell inside the build env |
| 213 | 213 |
$(DOCKER_RUN_DOCKER) bash |
| 214 | 214 |
|
| 215 |
+.PHONY: dev |
|
| 216 |
+dev: build ## start a dev mode inside the build env |
|
| 217 |
+ $(DOCKER_RUN_DOCKER) hack/dev.sh |
|
| 218 |
+ |
|
| 215 | 219 |
.PHONY: test |
| 216 | 220 |
test: build test-unit ## run the unit, integration and docker-py tests |
| 217 | 221 |
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary test-integration test-docker-py |
| 218 | 222 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,13 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+ |
|
| 2 |
+while true; do |
|
| 3 |
+ if ! ./hack/make.sh binary; then |
|
| 4 |
+ # If the build fails, sleep for 5 seconds and continue |
|
| 5 |
+ sleep 5 |
|
| 6 |
+ continue |
|
| 7 |
+ fi |
|
| 8 |
+ KEEPBUNDLE=1 ./hack/make.sh install-binary || continue |
|
| 9 |
+ |
|
| 10 |
+ dockerd --debug || true |
|
| 11 |
+ sleep 0.1 |
|
| 12 |
+done |