mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 23:42:29 +00:00
Add a make target to build and deploy the image.
This commit is contained in:
parent
0d8e9e0627
commit
177823c2f9
12
Makefile
12
Makefile
@ -2,6 +2,8 @@ DISABLE_CACHE = 'false'
|
||||
|
||||
ARCH = rpi# rpi/x86_64/i386
|
||||
|
||||
DEPLOY_REGISTRY = registry.resindev.io:5000
|
||||
|
||||
SUPERVISOR_VERSION = latest
|
||||
|
||||
BUILDSTEP_VERSION = master
|
||||
@ -49,6 +51,10 @@ supervisor: supervisor-base
|
||||
docker build --no-cache=$(DISABLE_CACHE) -t resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION) .
|
||||
rm Dockerfile
|
||||
|
||||
deploy: supervisor
|
||||
docker tag -f $(IMAGE) $(DEPLOY_REGISTRY)/$(IMAGE)
|
||||
docker push $(DEPLOY_REGISTRY)/$(IMAGE)
|
||||
|
||||
supervisor-accelerated: supervisor-base
|
||||
ifneq "$(ARCH)" "rpi"
|
||||
@echo 'Can only accelerate an rpi build.'
|
||||
@ -65,9 +71,13 @@ endif
|
||||
-docker rm build-supervisor-latest 2> /dev/null
|
||||
endif
|
||||
|
||||
deploy-accelerated: supervisor-accelerated
|
||||
docker tag -f $(IMAGE) $(DEPLOY_REGISTRY)/$(IMAGE)
|
||||
docker push $(DEPLOY_REGISTRY)/$(IMAGE)
|
||||
|
||||
run-supervisor-x86_64:
|
||||
docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -v /boot/config.json:/boot/config.json -v /:/mnt/root -v /resin-data/resin-supervisor:/data -v /proc/net/fib_trie:/mnt/fib_trie -v /var/log/supervisor-log:/var/log -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/x86_64-supervisor /start
|
||||
run-supervisor-i386:
|
||||
docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -v /boot/config.json:/boot/config.json -v /:/mnt/root -v /resin-data/resin-supervisor:/data -v /proc/net/fib_trie:/mnt/fib_trie -v /var/log/supervisor-log:/var/log -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/i386-supervisor /start
|
||||
|
||||
.PHONY: supervisor supervisor-accelerated run-supervisor-x86_64 run-supervisor-i386
|
||||
.PHONY: supervisor supervisor-accelerated deploy deploy-accelerated run-supervisor-x86_64 run-supervisor-i386
|
||||
|
Loading…
Reference in New Issue
Block a user