# Report on using discourse\_docker on a CoreOS image

**URL:** <https://meta.discourse.org/t/report-on-using-discourse-docker-on-a-coreos-image/19745>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [7. September 2014 um 07:59 UTC](https://meta.discourse.org/t/report-on-using-discourse-docker-on-a-coreos-image/19745 "2014-09-07T07:59:26Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![tsu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tsu/32/114775_2.png) [@tsu](https://meta.discourse.org/u/tsu)\
**Post date:** [18. Februar 2015 um 17:05 UTC](https://meta.discourse.org/t/report-on-using-discourse-docker-on-a-coreos-image/19745/19 "2015-02-18T17:05:15Z")

</div>

Discourse installs without any modifications on CoreOS beginning with:

[https://github.com/discourse/discourse\_docker/pull/100/commits](https://github.com/discourse/discourse_docker/pull/100/commits)

Using CoreOS’ _fleet_ is trivial but requires a small change which prevents that a different _restart policy_ than below is set when boostrapping or rebuilding:

```patch
--- a/launcher
+++ b/launcher
@@ -319,5 +319,5 @@ if compare_version "1.2.0" "$docker_version"; then
   echo "We recommend you upgrade docker, the version you are running has no restart policies, on reboot your container may not start up"
   restart_policy=""
 else
- restart_policy=${restart_policy:---restart=always}
+ : ${restart_policy:="--restart=no"}
 fi

```

… and here is an exemplary _service_ file:

```systemd
[Unit]
Description=Discourse for my EVE Online clan
ConditionPathIsDirectory=/var/discourse/shared/section8dot
After=docker.service
Requires=docker.service

[Service]
Environment="SUPERVISED=true"
WorkingDirectory=/var/discourse
ExecStart=/var/discourse/launcher start section8dot
ExecStop=/var/discourse/launcher stop section8dot
ExecStopPost=-/bin/bash -c "/usr/bin/systemctl stop docker-$(docker ps -a --no-trunc | grep -m 1 -F discourse/section8dot:latest | cut -d ' ' -f 1).scope"

[Install]
WantedBy=multi-user.target

```

---

_[View the full topic](https://meta.discourse.org/t/report-on-using-discourse-docker-on-a-coreos-image/19745)._
