# Getting the commit-id from the current release from inside of service/docker

**URL:** <https://forums.balena.io/t/getting-the-commit-id-from-the-current-release-from-inside-of-service-docker/363037>\
**Category:** balenaOS\
**Tags:** docker\
**Created:** [September 23, 2022, 8:15am UTC](https://forums.balena.io/t/getting-the-commit-id-from-the-current-release-from-inside-of-service-docker/363037 "2022-09-23T08:15:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiddens](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tiddens](https://forums.balena.io/u/Tiddens)\
**Post date:** [September 23, 2022, 8:15am UTC](https://forums.balena.io/t/getting-the-commit-id-from-the-current-release-from-inside-of-service-docker/363037/1 "2022-09-23T08:15:39Z")

</div>

Hi everyone,  
in order to document measured data well, I need to get the commit-id from inside of the container. The container name and fleet are available as environment variables, unfortunately not the commit id. Anybody has any idea how to get the commit?  
Best  
Arne

---

<div class="post-metadata">

**Author:** ![rcooke-warwick](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rcooke-warwick](https://forums.balena.io/u/rcooke-warwick)\
**Post date:** [September 23, 2022, 11:43am UTC](https://forums.balena.io/t/getting-the-commit-id-from-the-current-release-from-inside-of-service-docker/363037/3 "2022-09-23T11:43:58Z")

</div>

Hi there, I’d probably recommend using the supervisor API to talk to the supervisor from within your container and fetch the commit it. This can be done like so: [Interacting with the balena Supervisor - Balena Documentation](https://www.balena.io/docs/reference/supervisor/supervisor-api/#get-v1device)

e.g

```auto
$ curl -X GET --header "Content-Type:application/json" \
   "$BALENA_SUPERVISOR_ADDRESS/v1/device?apikey=$BALENA_SUPERVISOR_API_KEY"

```

Keep in mind that interacting with the supervisor from inside the container will require the `io.balena.features.supervisor-api` label to be set in your `docker-compose.yml` file for the container:

```auto
labels:
      io.balena.features.supervisor-api: '1'

```
