# tag docker containers

**URL:** <https://community.dynatrace.com/t/tag-docker-containers/9587>\
**Category:** Container platforms\
**Tags:** tagging, docker\
**Created:** [December 6, 2017, 9:29am UTC](https://community.dynatrace.com/t/tag-docker-containers/9587 "2017-12-06T09:29:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [December 6, 2017, 9:29am UTC](https://community.dynatrace.com/t/tag-docker-containers/9587/1 "2017-12-06T09:29:41Z")

</div>

Hi,

Is it possible to automatically tag containers running in Docker in the same way as this is done in openshift?

KR Henk

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [December 6, 2017, 1:08pm UTC](https://community.dynatrace.com/t/tag-docker-containers/9587/2 "2017-12-06T13:08:56Z")

</div>

Not sure how it’s done for OpenShift (I don’t have any OpenShift nearby), but you actually can automatically tag services/process groups based on rules. You can use values of docker image name/image version/docker container name in your rules. It quite useful and straightforward, although I’ve encountered few glitches.

Would this fit your case?

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [December 7, 2017, 9:43am UTC](https://community.dynatrace.com/t/tag-docker-containers/9587/3 "2017-12-07T09:43:54Z")

</div>

Hi Julius,

Thx for your reply, I will give you feedback on this next week, I will have a talk with the application developer.

FYI you define tags in a container description, which will be exposed to Dynatrace when running in Openshift environment.

KR Henk

---

<div class="post-metadata">

**Author:** ![bcox2](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@bcox2](https://community.dynatrace.com/u/bcox2)\
**Post date:** [February 8, 2018, 8:09pm UTC](https://community.dynatrace.com/t/tag-docker-containers/9587/4 "2018-02-08T20:09:48Z")

</div>

If you want to use the DT\_TAGS option in Docker has nayone had any success getting this to show up in Dynatrace? Where do you need to place the tag for It to be seen. I have tried a few options and it just breaks the container creation. Thanks Brian

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [February 8, 2018, 8:23pm UTC](https://community.dynatrace.com/t/tag-docker-containers/9587/5 "2018-02-08T20:23:01Z")

</div>

What have you tried so far? That is an environment variable so here is what I found for setting those in docker containers:

[https://stackoverflow.com/questions/30494050/how-do-i-pass-environment-variables-to-docker-containers](https://stackoverflow.com/questions/30494050/how-do-i-pass-environment-variables-to-docker-containers)

I haven’t personally played with this yet. It expect it would also pick any set up that way at the docker host level too - not sure what the interaction would be.

---

<div class="post-metadata">

**Author:** ![MaciejNeumann](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@MaciejNeumann](https://community.dynatrace.com/u/MaciejNeumann)\
**Post date:** [December 19, 2022, 11:45am UTC](https://community.dynatrace.com/t/tag-docker-containers/9587/6 "2022-12-19T11:45:43Z")

</div>

Hello&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)

{DockerContainerGroupInstance:ContainerName} is one of the available placeholders for tag value when creating&nbsp;automatically applied tags:

 ![Opera Snapshot_2022-12-19_124437_etu38336.live.dynatrace.com.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/5/852d32571f9774d981a6ce3b31fb23d425315b10.png)
