mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-19 11:16:34 +00:00
Better volume handling
This commit is contained in:
parent
fb019d7192
commit
f87c4915da
11
Makefile
11
Makefile
@ -16,17 +16,16 @@ clean:
|
||||
supervisor-dind:
|
||||
cd tools/dind && docker build --no-cache=$(DISABLE_CACHE) -t resin/resin-supervisor-dind:$(SUPERVISOR_VERSION) .
|
||||
|
||||
run-supervisor: supervisor-dind
|
||||
-docker stop resin_supervisor_1 > /dev/null
|
||||
-docker rm -f resin_supervisor_1 > /dev/null
|
||||
run-supervisor: supervisor-dind stop-supervisor
|
||||
cd tools/dind \
|
||||
&& sed --in-place -e "s|SUPERVISOR_IMAGE=.*|SUPERVISOR_IMAGE=$(DEPLOY_REGISTRY)$(IMAGE) |" config/env \
|
||||
&& docker run -d --name resin_supervisor_1 --privileged -v $$(pwd)/config.json:/usr/src/app/config/config.json -v $$(pwd)/config/env:/usr/src/app/config/env -v /sys/fs/cgroup:/sys/fs/cgroup:ro resin/resin-supervisor-dind:$(SUPERVISOR_VERSION)
|
||||
|
||||
stop-supervisor:
|
||||
# Prevent us from running out of loopback devices, as per https://github.com/jpetazzo/dind/issues/19
|
||||
docker exec resin_supervisor_1 umount /var/lib/docker
|
||||
docker stop resin_supervisor_1
|
||||
-docker stop resin_supervisor_1 > /dev/null
|
||||
# Remove volumes to prevent us from running out of loopback devices,
|
||||
# as per https://github.com/jpetazzo/dind/issues/19
|
||||
-docker rm -f --volumes resin_supervisor_1 > /dev/null
|
||||
|
||||
supervisor:
|
||||
cp Dockerfile.$(ARCH) Dockerfile
|
||||
|
Loading…
Reference in New Issue
Block a user