# Why does Discourse have to use Docker?

**URL:** https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041
**Category:** Self-hosting
**Tags:** docker
**Created:** [5 maart 2015 om 19:59 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041 "2015-03-05T19:59:01Z")
**Posts on this page:** 17
**Page:** 2

<div class="post-metadata">

### Author: ![Flow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flow/32/105280_2.png) [@Flow](https://meta.discourse.org/u/Flow)
#### Post date: [14 maart 2015 om 11:34 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/21 "2015-03-14T11:34:01Z")

</div>

> [@codinghorror](#):
>
> Debian is horrible.

Care to elaborate?

As far as I can tell debian (stable) provides an execution environment that’ sufficient for discourse without docker. And some (most?) cheap VPS boxes don’t allow you to run docker, but will give you 20- GiB of disk space and 2GiB RAM. I’ve one of those and my (low-traffic) discourse installation runs happily there.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [14 maart 2015 om 12:37 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/22 "2015-03-14T12:37:41Z")

</div>

Which procedure are we talking about?

If Docker is involved, the whole thing is completely independent from the host’s package manager and package sources.

---

<div class="post-metadata">

### Author: ![Flow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flow/32/105280_2.png) [@Flow](https://meta.discourse.org/u/Flow)
#### Post date: [14 maart 2015 om 16:53 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/23 "2015-03-14T16:53:08Z")

</div>

> [@elberet](#):
>
> Which procedure are we talking about?

The one from [https://github.com/discourse/discourse/blob/master/docs/INSTALL-ubuntu.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-ubuntu.md) with `s/ubuntu/debian/`.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [14 maart 2015 om 17:14 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/24 "2015-03-14T17:14:47Z")

</div>

Ah ok. Yeah, the use of `rvm` in that manual mitigates the lack of a more recent Ruby in Debian.

But then there’s

- nginx: wheezy = **1.2**.2, latest = **1.7**.10
- Redis: wheezy = **2.4**.14, latest = **2.8**.19
- PostgreSQL: wheezy = **9.1**.15, latest = **9.4**.1

---

<div class="post-metadata">

### Author: ![Flow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flow/32/105280_2.png) [@Flow](https://meta.discourse.org/u/Flow)
#### Post date: [14 maart 2015 om 18:04 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/25 "2015-03-14T18:04:05Z")

</div>

nginx 1.2 and postgresql 9.1 works fine here with discourse. And I pinned redis-server from debian testing.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [14 maart 2015 om 18:32 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/26 "2015-03-14T18:32:15Z")

</div>

Then you’re missing out on a _lot_ of performance improvements, especially with regard to TLS handshakes, that nginx has received since that version.

Sure, if your forum is small enough, you can certainly do without, and if nothing else, Debian ist excellent at backporting security fixes to outdated versions. 😁

---

<div class="post-metadata">

### Author: ![Flow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flow/32/105280_2.png) [@Flow](https://meta.discourse.org/u/Flow)
#### Post date: [14 maart 2015 om 19:31 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/27 "2015-03-14T19:31:50Z")

</div>

> [@elberet](#):
>
> Sure, if your forum is small enough, you can certainly do without, and if nothing else, Debian ist excellent at backporting security fixes to outdated versions.

Yep, that perfectly fulfills my use case: Discourse **without** Docker and with minimal maintenance effort.

---

<div class="post-metadata">

### Author: ![JSey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jsey/32/3540_2.png) [@JSey](https://meta.discourse.org/u/JSey)
#### Post date: [14 maart 2015 om 21:13 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/29 "2015-03-14T21:13:58Z")

</div>

> [@codinghorror](#):
>
> Debian is horrible. We don’t recommend it. You can’t even run Docker on it for the same reason.

That’s just BS, sorry. I run it on Debian (inside Docker), it works very well; there are some things you need to consider.

Generalizations are a bit problematic if they’re coming on this strongly…

---

<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: [14 maart 2015 om 22:05 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/30 "2015-03-14T22:05:41Z")

</div>

I think @codinghorror objects to the hugely conservative release cycle practiced by debian, its just way too slow for our liking.

not sure if you can get aufs going on debian, device mapper is a disaster on docker and not sure what release of btrfs you would be on, but I doubt it is recent. no chance of getting overlayfs imo. Not sure how you are getting a decent docker install.

---

<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: [15 maart 2015 om 09:01 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/32 "2015-03-15T09:01:46Z")

</div>

All the templates are open source, no magic included

We use runit and unicorn, unicorn forks out sidekiq

---

<div class="post-metadata">

### Author: ![JSey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jsey/32/3540_2.png) [@JSey](https://meta.discourse.org/u/JSey)
#### Post date: [15 maart 2015 om 18:55 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/33 "2015-03-15T18:55:55Z")

</div>

> [@sam](#):
>
> I think @codinghorror objects to the hugely conservative release cycle practiced by debian, its just way too slow for our liking. [/quote]  
> Sure - it’s not the recommended installation path, but it works just fine if you pull a backported kernel to get Docker running. If you’re installing Discourse on a vm which is dedicated to running Discourse, and nothing else, there’s hardly any discussion on whether or not to use the default, recommended installation route.
> 
> But if Discourse in a Docker container is one of many applications running on a dedicated server, you can assume that the admin is tech savvy enough to get Docker running on almost any other Linux distro as well - all you have to do is do a Google search for Docker+Debian 7, follow the instructions, and you’re there. I’m using aufs just fine.
> 
> I understand that the team is unwilling to support any other than the recommended setup, but the statements should not become as fatalistic and kind of false as _“Windows just sucks because it produces nothing than blue screens”_…
> 
> [quote=“sam, post:30, topic:26041, full:true”]not sure if you can get aufs going on debian, device mapper is a disaster on docker and not sure what release of btrfs you would be on, but I doubt it is recent. no chance of getting overlayfs imo. Not sure how you are getting a decent docker install.

- aufs works just fine,
- why btrfs additionally to aufs?
- device mapper being used as an alternative to? aufs, I guess? So, no need for that, either…

As I said: it requires a piece of extra work to pull a more recent backported kernel, but with that, it works just fine!

---

<div class="post-metadata">

### Author: ![jplatte](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jplatte/32/77661_2.png) [@jplatte](https://meta.discourse.org/u/jplatte)
#### Post date: [21 maart 2015 om 04:27 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/34 "2015-03-21T04:27:31Z")

</div>

Nice, thanks for the link to the old manual, and the script! 🙂

I guess I could also use Docker, but as long as there is no ‘How to integrate discourse\_docker into an existing system with a normal webserver’ tutorial, this method is far simpler for me.

---

<div class="post-metadata">

### Author: ![crohr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crohr/32/107480_2.png) [@crohr](https://meta.discourse.org/u/crohr)
#### Post date: [24 maart 2015 om 17:13 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/41 "2015-03-24T17:13:36Z")

</div>

Just wanted to chime in to clear things up: I run [packager.io](http://packager.io), so I can confirm that Discourse is still maintained. What Packager does is simple: it takes an app, applies one of the Heroku buildpacks on it, and package that into a deb/rpm for any number of the Linux distributions we support.

So you basically end up with what you would get on Heroku (i.e. processes are launched based on your Procfile, using the exact ruby version and gems specified in your Gemfile), but on your server(s). The package also ships with init scripts, logrotate, crons, etc.  
For other dependencies, we rely on the system dependencies provided by the package manager of the distribution (i.e. we don’t package the world).

That being said, I can understand why Discourse went the docker route, especially if the alternative was a manual/roll-your-own install.

---

<div class="post-metadata">

### Author: ![Radioshark](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@Radioshark](https://meta.discourse.org/u/Radioshark)
#### Post date: [29 april 2015 om 15:09 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/42 "2015-04-29T15:09:30Z")

</div>

I just setup my first Discourse installation on DO using Ubuntu and Docker and I have to say it was painless. I have read on this forum that some people have Discourse configured with Nginx. I don’t use Nginx and while setting up Discourse I don’t remember installing Apache. So my question is.. how are my web requests being handled? Also, does using Nginx make Discourse run more efficiently?

---

<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: [29 april 2015 om 22:08 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/43 "2015-04-29T22:08:33Z")

</div>

> [@Radioshark](#):
>
> . how are my web requests being handled?

NGINX → Unicorn Master → Unicorn Worker

> [@Radioshark](#):
>
> Also, does using Nginx make Discourse run more efficiently?

Than what 🙂 … in general NGINX is more efficient than Apache and to get stuff like long polling working on Apache it takes some hoop jumping

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [29 september 2018 om 22:44 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/44 "2018-09-29T22:44:11Z")

</div>



---

<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: [29 september 2018 om 23:42 UTC](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041/45 "2018-09-29T23:42:33Z")

</div>



[Vorige pagina](https://meta.discourse.org/t/why-does-discourse-have-to-use-docker/26041.md?page=1)
