# Balena push does not use cache

**URL:** <https://forums.balena.io/t/balena-push-does-not-use-cache/271223>\
**Category:** balenaOS\
**Tags:** local-mode, docker-compose\
**Created:** [March 12, 2021, 11:27am UTC](https://forums.balena.io/t/balena-push-does-not-use-cache/271223 "2021-03-12T11:27:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobyhijzen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tobyhijzen/32/2342_2.png) [@tobyhijzen](https://forums.balena.io/u/tobyhijzen)\
**Post date:** [March 12, 2021, 11:27am UTC](https://forums.balena.io/t/balena-push-does-not-use-cache/271223/1 "2021-03-12T11:27:45Z")

</div>

Dear support,

We are in the process of creating a release. However when pushing the release for testing to a device in local mode with 'balena push ’ one of the services is rebuild everytime even though nothing changes. It takes about 1 hour to build the entire docker so our development is seriously compromised at the moment. What could possibly cause this?

We do **not** use an option like =’–no-cache’ nor do we change anything in the dockerfile or docker-compose.yaml file. We are running host OS version: [balenaOS 2.58.6+rev1](https://github.com/balena-os/meta-balena/blob/master/CHANGELOG.md) and supervisor version [  
11.14.0  
 ](https://github.com/balena-io/balena-supervisor/blob/master/CHANGELOG.md#v11140) balena cli:12.38.3

[UPDATE] 12-03-2021 14:56

I’ve upgraded to balena-cli version 12.40.4 and I was still experiencing the same issues.

Next I simplified the docker. It now only contains the following:

```auto
FROM debian:buster

ENV DEBIAN_FRONTEND=noninteractive

# Install git and ssh
RUN apt update && apt install -y --no-install-recommends \
        openssh-client \
        git && \
    apt clean && rm -rf /var/lib/apt/lists/*

RUN apt update

CMD ["/bin/bash"]

```

This loads the cache but gives the following error:

```auto
[Error] There was an error rebuilding the service: InvalidArgumentError: Dockerfile with 2 stages provided, but 0 image IDs passed to livepush constructor (there should be 1)

```

It is important to note that the dockerfile in question was a multi-stage docker. Also when compiling with docker I don’t experience any issues.

Kind regards,  
Toby

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [March 18, 2021, 12:25pm UTC](https://forums.balena.io/t/balena-push-does-not-use-cache/271223/3 "2021-03-18T12:25:25Z")

</div>

Hi Toby,  
I’d like to ask you regarding the OS and supervisor version. They are kind of older versions. Is there any particular reason you don’t upgrade to a newer version?  
Moreover, it would be great if you could share with us the output of the `balena push` saved at a log.txt file.

Georgia

---

<div class="post-metadata">

**Author:** ![tobyhijzen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tobyhijzen/32/2342_2.png) [@tobyhijzen](https://forums.balena.io/u/tobyhijzen)\
**Post date:** [March 18, 2021, 2:43pm UTC](https://forums.balena.io/t/balena-push-does-not-use-cache/271223/5 "2021-03-18T14:43:02Z")

</div>

Hi Georgia,

We are using a generic x86\_64 with the most recent [balenaOS 2.58.6+rev1](https://github.com/balena-os/meta-balena/blob/master/CHANGELOG.md) at least this is the highest version selectable when we select ‘Add device’. Furthermore I am not aware of any method to update the supervisor version.

Next time I encounter this issue I’ll make sure to make a log and share it here.

Kind regards,  
Toby

---

<div class="post-metadata">

**Author:** ![nitish](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@nitish](https://forums.balena.io/u/nitish)\
**Post date:** [March 18, 2021, 3:51pm UTC](https://forums.balena.io/t/balena-push-does-not-use-cache/271223/6 "2021-03-18T15:51:23Z")

</div>

Hi,

Thanks for the details here. Do share the logs if you come across this issue again. In the meantime, following is the process to `force` update supervisor:

> **[Interacting with the balena Supervisor - Balena Documentation](https://www.balena.io/docs/reference/supervisor/supervisor-api/#post-v1update)**

```auto
curl -X POST --header "Content-Type:application/json" \
    --header "Authorization: Bearer <auth token>" \
    --data '{"uuid": <uuid>, "data": {"force": true}}' \
    "https://api.balena-cloud.com/supervisor/v1/update"

```
