# Can we install discourse in another container distro?

**URL:** https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941
**Category:** Development
**Created:** [7월 10, 2018, 6:55오전 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941 "2018-07-10T06:55:44Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 10, 2018, 6:55오전 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/1 "2018-07-10T06:55:44Z")

</div>

when I enter discourse application, I can realize that the container of my discourse forum is ubuntu 16.04. Its working fine. However I’m curious, can we install discourse on other container distros like centos or ubuntu 18.04?

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [7월 10, 2018, 8:08오전 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/2 "2018-07-10T08:08:41Z")

</div>

ubuntu 18 04 ok for me.

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 10, 2018, 8:19오전 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/3 "2018-07-10T08:19:29Z")

</div>

> [@TheBestPessimist](#):
>
> ubuntu 18 04 ok for me.

I’m not asking if discourse can be installed on an ubuntu 18.04 server. I’m pretty much sure it works ok.  
My question is about the container distro. now its 16.04 and I’m asking if it can be changed to any other distro.

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [7월 10, 2018, 8:26오전 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/4 "2018-07-10T08:26:08Z")

</div>

Ah, now i understand. I don’t have any idea though. Team could answer this.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [7월 10, 2018, 1:36오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/5 "2018-07-10T13:36:00Z")

</div>

You are free to try. Just keep in mind that we only support our official images here in Meta.

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 10, 2018, 3:04오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/6 "2018-07-10T15:04:02Z")

</div>

> [@Falco](#):
>
> we only support our official images

I exactly want to know if there is an official way to use another distro for discourse container.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [7월 10, 2018, 3:25오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/7 "2018-07-10T15:25:34Z")

</div>

No. If you want to build your own Discourse container based on another distribution (and why would you?), you’re on your own.

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 11, 2018, 7:54오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/8 "2018-07-11T19:54:01Z")

</div>

> [@fefrei](#):
>
> and why would you?

I have a weird problem with ubuntu 16.04 in some of my servers. The problem is that in a fresh ubuntu 16.04, whether it is a docker container or it is an ubuntu server, curl of most https sites wont give me an output. for example I get this:

```
curl https://ipinfo.io
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.

```

now for the case of discourse, this problem prevents letsencrypt from working. because in the middle of acme.sh code, there is a curl to this address:

```
https://acme-v01.api.letsencrypt.org/directory

```

Now hopefully today an ubuntu specialist take a look at my case and he somehow found the problem. As he said, the problem is that curl with whatever reason, didn’t support http2 websites. and he add http2 support to curl by these :

```
add-apt-repository ppa:jonathonf/curl
apt-get update
apt-get upgrade

```

Now my problem is how I can execute this code to discourse container before discourse installation?  
And also can someone explain why curl in ubuntu 16.04 isn’t supporting http2, at least in my discourse container?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [7월 11, 2018, 10:01오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/9 "2018-07-11T22:01:15Z")

</div>

Are you sure that the problem is our container curl version? Or are you behind a bad proxy?

I just run this curl using our official image just fine.

Are you using our official image and launcher?

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 11, 2018, 10:08오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/10 "2018-07-11T22:08:50Z")

</div>

> [@Falco](#):
>
> Are you using our official image and launcher?

yes

> [@Falco](#):
>
> I just run this curl using our official image just fine.

Yes. For me it was also ok till some days ago. And suddenly, letsencrypt stopped renewing.

> [@Falco](#):
>
> Or are you behind a bad proxy?

I think I’m not behind a bad proxy. because I’m ok with curl of any https website in my discourse server that is a centos 7.

> [@codinghorror](#):
>
> I’d rebuild with a newer Ubuntu Server LTS. Why are you on 16.04 and not the current version, 18?

My server is centos. Its not a problem with centos server. the problem is inside discourse container.

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 11, 2018, 10:27오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/11 "2018-07-11T22:27:21Z")

</div>

> [@Falco](#):
>
> I just run this curl using our official image just fine.

btw the point here is that I’m able to fix the problem by entring discourse container and running those command I mentioned:

> [@hosna](#):
>
> add-apt-repository ppa:jonathonf/curl apt-get update apt-get upgrade

I mean After running these commands, Then I’m able to manually renew letsencrypth [according to this guide](https://meta.discourse.org/t/setting-up-lets-encrypt/40709?source_topic_id=61743).

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [7월 11, 2018, 10:30오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/12 "2018-07-11T22:30:16Z")

</div>

Well, just add this to your app.yml file:

```plaintext
hooks:
  before_ssl:
    - exec:
      cmd:
        - add-apt-repository ppa:jonathonf/curl
        - apt-get update
        - apt-get upgrade

```

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [7월 11, 2018, 11:04오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/13 "2018-07-11T23:04:10Z")

</div>

Thank you very much. It fixed my problem. 🙂

However I believe its worth checking the problem of curl in the container.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [7월 11, 2018, 11:51오후 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/14 "2018-07-11T23:51:09Z")

</div>

> [@hosna](#):
>
> However I believe its worth checking the problem of curl in the container.

But there is no problem! I just tested in a container we deployed today in AWS.

Here, let me curl from the container that is running this forum right now:

```plaintext
root@app-07d915db576094080:/# curl https://acme-v01.api.letsencrypt.org/directory -vv -I 
* Trying 104.86.94.242...                                                              
* Connected to acme-v01.api.letsencrypt.org (104.86.94.242) port 443 (#0)                
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt                           
* found 594 certificates in /etc/ssl/certs                                               
* ALPN, offering http/1.1                                                                
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384                             
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: acme-v02.api.letsencrypt.org (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: CN=acme-v02.api.letsencrypt.org
* start date: Fri, 25 May 2018 00:25:19 GMT
* expire date: Thu, 23 Aug 2018 00:25:19 GMT
* issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
* compression: NULL
* ALPN, server accepted to use http/1.1
> HEAD /directory HTTP/1.1
> Host: acme-v01.api.letsencrypt.org
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK

```

The curl version does negotiate http/1.1 indeed (it would try both 1.1 and 2.0 in latest curl) but it works just fine. There is no way a site doesn’t offers http 1.1 today.

I think you have some bad configured proxy somewhere that is breaking ALPN.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [7월 24, 2018, 5:26오전 UTC](https://meta.discourse.org/t/can-we-install-discourse-in-another-container-distro/91941/15 "2018-07-24T05:26:56Z")

</div>

I believe that I had a similar problem that was somehow related to dns lookups.
