# Using docker inspect

**URL:** <https://community.codefresh.io/t/using-docker-inspect/236>\
**Category:** Pipeline Steps\
**Created:** [November 14, 2019, 1:20am UTC](https://community.codefresh.io/t/using-docker-inspect/236 "2019-11-14T01:20:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlmutch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/karlmutch/32/174_2.png) [@karlmutch](https://community.codefresh.io/u/karlmutch)\
**Post date:** [November 14, 2019, 1:20am UTC](https://community.codefresh.io/t/using-docker-inspect/236/1 "2019-11-14T01:20:31Z")

</div>

After a build step has completed and the image has been placed into the cfcr registry how can I from within the pipeline use a standard docker inspect command to retrieve information about the built image ?

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 14, 2019, 9:33am UTC](https://community.codefresh.io/t/using-docker-inspect/236/2 "2019-11-14T09:33:46Z")

</div>

Hello

Using docker inspect requires direct access to the docker daemon socket. For security reasons this is not offered in SAAS plans (it is available to enterprise customers on a case by case basis)

You could use the codefresh CLI to get some basic image information.  
[https://codefresh-io.github.io/cli/images/](https://codefresh-io.github.io/cli/images/)

Would that work in your case? What kind of info do you need from the image? Can you explain a bit your scenario?

---

<div class="post-metadata">

**Author:** ![karlmutch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/karlmutch/32/174_2.png) [@karlmutch](https://community.codefresh.io/u/karlmutch)\
**Post date:** [November 14, 2019, 6:51pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/3 "2019-11-14T18:51:30Z")

</div>

Hi,

I am wanting to inspect the Labels that were specified in the Docker file build. Here is an example where you can see the code fresh annotations added as labels followed by labels I wish to query.

```
       "Labels": {
            "io.codefresh.repo.branch": "feature/233_kustomize",
            "io.codefresh.repo.hash": "ad284fc5d7e8e431e7280c22f7a6c8e3cfb09c3e",
            "io.codefresh.repo.name": "studio-go-runner",
            "io.codefresh.repo.owner": "leaf-ai",
            "io.codefresh.repo.sha": "6b6a0ebde4bc6ae8d9e99592620220255f323779",
            "io.codefresh.repo.type": "yml",
            "registry.repo": "leafai/studio-go-runner-dev-base",
            "registry.version": "0.0.2",
            "vendor": "Cognizant, AI&A"
        }

```

Thanks  
Karl

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 15, 2019, 12:30pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/4 "2019-11-15T12:30:50Z")

</div>

Could you use the Codefresh CLI then?

[Codefresh CLI Documentation](https://codefresh-io.github.io/cli/annotations/get/)

There is already a docker image with the cli, so it is very easy to use it in a Codefresh pipeline

> **[Codefresh API](https://codefresh.io/docs/docs/integrations/codefresh-api/#using-codefresh-from-within-codefresh)**
>
> How to integrate Codefresh with other systems

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 15, 2019, 12:33pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/5 "2019-11-15T12:33:27Z")

</div>

You might also find our annotations page interesting

> **[Annotations](https://codefresh.io/docs/docs/codefresh-yaml/annotations/)**
>
> Mark your builds and projects with extra annotations

---

<div class="post-metadata">

**Author:** ![karlmutch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/karlmutch/32/174_2.png) [@karlmutch](https://community.codefresh.io/u/karlmutch)\
**Post date:** [November 15, 2019, 4:31pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/6 "2019-11-15T16:31:28Z")

</div>

When I do this it gives the following error. I have tried this using both the CLI remotely as well as within my call flow.

```
codefresh get annotation image 8074bb9c7a72
Error: "{\"status\":500,\"code\":\"1001\",\"name\":\"INTERNAL_SERVER_ERROR\",\"message\":\"Internal server error\",\"context\":{}}"

```

---

<div class="post-metadata">

**Author:** ![karlmutch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/karlmutch/32/174_2.png) [@karlmutch](https://community.codefresh.io/u/karlmutch)\
**Post date:** [November 15, 2019, 7:06pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/7 "2019-11-15T19:06:27Z")

</div>

Moved discussion to a support ticket. Will update this thread when there is a result.

---

<div class="post-metadata">

**Author:** ![evanx9](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/evanx9/32/156_2.png) [@evanx9](https://community.codefresh.io/u/evanx9)\
**Post date:** [November 19, 2019, 2:25pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/8 "2019-11-19T14:25:03Z")

</div>

Interested to hear what you had to do

---

<div class="post-metadata">

**Author:** ![karlmutch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/karlmutch/32/174_2.png) [@karlmutch](https://community.codefresh.io/u/karlmutch)\
**Post date:** [November 19, 2019, 5:18pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/9 "2019-11-19T17:18:44Z")

</div>

Still waiting on a reply to the support ticket from codefresh.

---

<div class="post-metadata">

**Author:** ![vidhyav](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/vidhyav/32/183_2.png) [@vidhyav](https://community.codefresh.io/u/vidhyav)\
**Post date:** [December 9, 2019, 8:57pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/10 "2019-12-09T20:57:56Z")

</div>

Update: This issue seems to have been fixed on November 25th. @karlmutch I saw that you had updated the ticket confirming the fix. Thank you.

@evanx9: Is this something you were running into and still need assistance with?

---

<div class="post-metadata">

**Author:** ![evanx9](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/evanx9/32/156_2.png) [@evanx9](https://community.codefresh.io/u/evanx9)\
**Post date:** [January 25, 2020, 3:18pm UTC](https://community.codefresh.io/t/using-docker-inspect/236/11 "2020-01-25T15:18:55Z")

</div>

I didn’t need assistance but was curious about the solution since there has been some interest on how we can use the cli calls in this manner.
