# How would I download built application images for introspection?

**URL:** <https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606>\
**Category:** Product support\
**Created:** [February 5, 2020, 9:52pm UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606 "2020-02-05T21:52:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nckswt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/nckswt/32/368_2.png) [@nckswt](https://forums.balena.io/u/nckswt)\
**Post date:** [February 5, 2020, 9:52pm UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/1 "2020-02-05T21:52:26Z")

</div>

I want to use [dive](https://github.com/wagoodman/dive) to optimize my layer sizes. How would I pull released images targeted for a Raspberry Pi 3 from Balena’s registry? (Not sure if I could even run `dive` on those images, but I’d like to try!)

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [February 6, 2020, 9:37am UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/2 "2020-02-06T09:37:42Z")

</div>

You would need a devices key and to use these as a docker login. The details are in config.json for this.

From my understanding this should work although I’ve never tried.

Alternatively have you thought about `balena save` on the HostOS?

---

<div class="post-metadata">

**Author:** ![ffissore](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ffissore/32/2842_2.png) [@ffissore](https://forums.balena.io/u/ffissore)\
**Post date:** [February 6, 2020, 10:28am UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/3 "2020-02-06T10:28:30Z")

</div>

Hi

you can pull balenalib images as any other docker image. For example `docker pull balenalib/raspberrypi3-debian-node:8-run`. Then you can analyse it using dive with `dive balenalib/raspberrypi3-debian-node:8-run`

federico

---

<div class="post-metadata">

**Author:** ![nckswt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/nckswt/32/368_2.png) [@nckswt](https://forums.balena.io/u/nckswt)\
**Post date:** [February 6, 2020, 9:00pm UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/5 "2020-02-06T21:00:21Z")

</div>

Hmm, looks like `balena save` gives me all the image layers as multiple directories – can I load that into my local `docker` images?

I guess a better question to ask is: how would I docker pull a released image I’ve created using `balena push`? Similar to [this question](https://forums.balena.io/t/feature-request-download-docker-image-from-releases-tab/4943/10).

---

<div class="post-metadata">

**Author:** ![samothx](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@samothx](https://forums.balena.io/u/samothx)\
**Post date:** [February 6, 2020, 10:13pm UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/6 "2020-02-06T22:13:22Z")

</div>

Hi Nick,  
the solution suggested in the post you linked is still my best guess. Does that wor for you ?  
Pulling the image from the registry will require permissions / credentials you do not have so I doubt that will work for you.  
Regards Thomas

---

<div class="post-metadata">

**Author:** ![garethtdavies](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/garethtdavies/32/2669_2.png) [@garethtdavies](https://forums.balena.io/u/garethtdavies)\
**Post date:** [February 6, 2020, 11:02pm UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/7 "2020-02-06T23:02:22Z")

</div>

In regards to your first question, I think you can simply use `docker load` to load the docker image produced by `balena save` to inspect with dive on your local machine. There is some more here with the syntax to use [https://pspdfkit.com/blog/2019/docker-import-export-vs-load-save/](https://pspdfkit.com/blog/2019/docker-import-export-vs-load-save/)

---

<div class="post-metadata">

**Author:** ![nckswt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/nckswt/32/368_2.png) [@nckswt](https://forums.balena.io/u/nckswt)\
**Post date:** [February 7, 2020, 3:31pm UTC](https://forums.balena.io/t/how-would-i-download-built-application-images-for-introspection/61606/9 "2020-02-07T15:31:49Z")

</div>

Worked like a charm!

For anyone else looking on how to do this, here’s the steps I took:

```
# In Host OS container
balena ps # copy IMAGE ID

balena save -o <IMAGE_ID>.tar <IMAGE_ID>
scp <IMAGE_ID>.tar <USER>@<HOST>:<PATH>

# On user machine
docker load -i <IMAGE_ID>.tar
dive <IMAGE_ID>
```
