mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-16 23:38:52 +00:00
Switch the supervisor-base image to include the deps we require, allowing make builds to work correctly (and faster, caching more) now that the deps have been removed from deps.sh
This commit is contained in:
parent
c207ac985b
commit
5e869f50a3
@ -1,5 +1,4 @@
|
||||
FROM resin/supervisor-base:latest
|
||||
RUN apt-get -q update && apt-get install -qqy openvpn libsqlite3-dev socat
|
||||
ADD . /app
|
||||
RUN /build/builder
|
||||
RUN apt-get clean
|
||||
|
13
Makefile
13
Makefile
@ -17,7 +17,9 @@ CACHE_VOLUME = # --volume /home/vagrant/cache:/cache
|
||||
|
||||
all: supervisor
|
||||
|
||||
BUILDSTEP_PRESENT = $(shell docker images --all | grep $(BUILDSTEP_VERSION) | awk '{print $$1}' | grep -xF $(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO) )
|
||||
VERSIONED_IMAGES = "$(shell docker images --all | grep $(BUILDSTEP_VERSION) | awk '{print $$1}')"
|
||||
BUILDSTEP_PRESENT = $(shell echo $(VERSIONED_IMAGES) | grep --extended-regexp '$(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO)(\s|$$)' )
|
||||
SUPERVISOR_BASE_PRESENT = $(shell echo $(VERSIONED_IMAGES) | grep --extended-regexp 'resin/supervisor-base(\s|$$)' )
|
||||
|
||||
supervisor-base:
|
||||
ifneq ($(BUILDSTEP_PRESENT) , )
|
||||
@ -25,7 +27,14 @@ ifneq ($(BUILDSTEP_PRESENT) , )
|
||||
else
|
||||
docker pull $(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO):$(BUILDSTEP_VERSION)
|
||||
endif
|
||||
docker tag $(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO):$(BUILDSTEP_VERSION) resin/supervisor-base:latest
|
||||
ifneq ($(SUPERVISOR_BASE_PRESENT) , )
|
||||
@echo "Using existing supervisor base from resin/supervisor-base:$(BUILDSTEP_VERSION)"
|
||||
else
|
||||
docker rm -f build-supervisor-base 2> /dev/null || true
|
||||
docker run --name build-supervisor-base $(BUILDSTEP_REGISTRY)/$(BUILDSTEP_REPO):$(BUILDSTEP_VERSION) bash -c "apt-get -q update && apt-get install -qqy openvpn libsqlite3-dev socat"
|
||||
docker commit build-supervisor-base resin/supervisor-base:$(BUILDSTEP_VERSION)
|
||||
endif
|
||||
docker tag resin/supervisor-base:$(BUILDSTEP_VERSION) resin/supervisor-base:latest
|
||||
|
||||
supervisor: supervisor-base
|
||||
docker build --no-cache=$(DISABLE_CACHE) -t $(IMAGE):$(SUPERVISOR_VERSION) .
|
||||
|
Loading…
x
Reference in New Issue
Block a user