# Is it possible to set a host name?

**URL:** <https://discuss.circleci.com/t/is-it-possible-to-set-a-host-name/23586>\
**Category:** Build Environment\
**Created:** [July 13, 2018, 8:40am UTC](https://discuss.circleci.com/t/is-it-possible-to-set-a-host-name/23586 "2018-07-13T08:40:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevhsu](https://avatars.discourse-cdn.com/v4/letter/k/c77e96/32.png) [@kevhsu](https://discuss.circleci.com/u/kevhsu)\
**Post date:** [July 13, 2018, 8:40am UTC](https://discuss.circleci.com/t/is-it-possible-to-set-a-host-name/23586/1 "2018-07-13T08:40:27Z")

</div>

I was wondering if there is a way to mimic the `-h` flag for `docker run` when running a container in CircleCI. I need to set the host name because we have a bunch of tests that check that name and then use it against apache configs that are set for certain patterns of URL. If I can’t set the host name, my tests won’t run properly in CircleCI.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 13, 2018, 1:00pm UTC](https://discuss.circleci.com/t/is-it-possible-to-set-a-host-name/23586/2 "2018-07-13T13:00:16Z")

</div>

You could try Dockerising your app and then running it in your own Docker Compose. I know DC works, I am guessing whether setting the hostname does. Try it!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 11, 2018, 1:00pm UTC](https://discuss.circleci.com/t/is-it-possible-to-set-a-host-name/23586/3 "2018-10-11T13:00:28Z")

</div>

Closed on October 11, 2018, 1:00pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
