# Change url on container

**URL:** <https://forum.ghost.org/t/change-url-on-container/14681>\
**Category:** Developer help\
**Created:** [May 26, 2020, 4:27pm UTC](https://forum.ghost.org/t/change-url-on-container/14681 "2020-05-26T16:27:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![soydepr](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/soydepr/32/7984_2.png) [@soydepr](https://forum.ghost.org/u/soydepr)\
**Post date:** [May 26, 2020, 4:27pm UTC](https://forum.ghost.org/t/change-url-on-container/14681/1 "2020-05-26T16:27:54Z")

</div>

can i change the url on running container ?  
l  
docker run -d --name ghost -e url=http://foo.bar

getting this error now

docker: Error response from daemon: Conflict. The container name “/ghost” is already in use by container "e8f2f9f748a63f4181ba3f7020ff

---

<div class="post-metadata">

**Author:** ![soydepr](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/soydepr/32/7984_2.png) [@soydepr](https://forum.ghost.org/u/soydepr)\
**Post date:** [May 27, 2020, 12:38am UTC](https://forum.ghost.org/t/change-url-on-container/14681/2 "2020-05-27T00:38:44Z")

</div>

this worked

> <https://github.com/moby/moby/issues/8838#issuecomment-117284347>
>
> One can pass environment vars into new containers when building them with "docke…r run":
> docker run -e "FOO=bar" ...
> 
> But how can one do that for an existing container, there is no -e option for docker run.
> I wish to be able to restart a container with a new environment setting, but do not wish to actually recreate the container (as it has lots of manual changes in there).
> 
> One option might be to commit the container to an image and create a new container based on that image. Seems a very roundabout way though.
> 
> have I missed something?
