# Container docker persistent

**URL:** https://meta.discourse.org/t/container-docker-persistent/31349
**Category:** Support
**Created:** [July 23, 2015, 12:08pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349 "2015-07-23T12:08:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Zonork](https://avatars.discourse-cdn.com/v4/letter/z/db5fbb/32.png) [@Zonork](https://meta.discourse.org/u/Zonork)
#### Post date: [July 23, 2015, 12:08pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349/1 "2015-07-23T12:08:18Z")

</div>

Hi, how i can make a container like Discourse container, i dont know how run my container and let them running if my server is shut down

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [July 23, 2015, 2:34pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349/2 "2015-07-23T14:34:25Z")

</div>

Not sure what you’re asking here… 😕

Docker will automatically restart the containers when the machine boots back up. Does that help?

---

<div class="post-metadata">

### Author: ![Zonork](https://avatars.discourse-cdn.com/v4/letter/z/db5fbb/32.png) [@Zonork](https://meta.discourse.org/u/Zonork)
#### Post date: [July 23, 2015, 2:43pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349/3 "2015-07-23T14:43:43Z")

</div>

Yeah my ask was so much ambiguous, sorry 😁.  
My question is:  
when the server shut down the docker container usually stop and stay exited, don’t restart automatically when the machine boots and docker engine start again, but the discourse container it does.

How i can make my other containers do the same?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [July 23, 2015, 2:45pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349/4 "2015-07-23T14:45:29Z")

</div>

You will have to read about docker’s [restart policies](https://docs.docker.com/articles/host_integration/).

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 23, 2015, 11:55pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349/5 "2015-07-23T23:55:15Z")

</div>

Keep in mind. `./launcher` is smart about ensuring we have restart policies in place.

> <https://github.com/discourse/discourse_docker/blob/master/launcher#L370>

---

<div class="post-metadata">

### Author: ![Zonork](https://avatars.discourse-cdn.com/v4/letter/z/db5fbb/32.png) [@Zonork](https://meta.discourse.org/u/Zonork)
#### Post date: [July 24, 2015, 9:24am UTC](https://meta.discourse.org/t/container-docker-persistent/31349/6 "2015-07-24T09:24:45Z")

</div>

Thank’s a lot im running persistent containers now, bur the restart policies, always restart the container in the correct order?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:46pm UTC](https://meta.discourse.org/t/container-docker-persistent/31349/7 "2024-06-08T12:46:08Z")

</div>

This topic was automatically closed after 3243 days. New replies are no longer allowed.
