# Usage of exit codes

**URL:** <https://forums.docker.com/t/usage-of-exit-codes/46586>\
**Category:** General\
**Tags:** docker\
**Created:** [February 19, 2018, 10:46am UTC](https://forums.docker.com/t/usage-of-exit-codes/46586 "2018-02-19T10:46:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravikumark425](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@ravikumark425](https://forums.docker.com/u/ravikumark425)\
**Post date:** [February 19, 2018, 10:46am UTC](https://forums.docker.com/t/usage-of-exit-codes/46586/1 "2018-02-19T10:46:09Z")

</div>

Hi,

Can anyone anyone tell the usage of exit codes in docker?

For ex:  
$ docker run -it test

```
root@f38c87f2a42d:/# exit 13

```

Now echo $? --\> shows 13  
Whats the use of this?

---

<div class="post-metadata">

**Author:** ![manmedia](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/manmedia/32/17315_2.png) [@manmedia](https://forums.docker.com/u/manmedia)\
**Post date:** [February 19, 2018, 10:50am UTC](https://forums.docker.com/t/usage-of-exit-codes/46586/2 "2018-02-19T10:50:16Z")

</div>

More in automation scripts where codes are analysed and decisions are made  
based on the types. I haven’t done this myself but the codes are  
demystified somewhere in docker dev docs.

Regards,
