# Docker base image with PostgreSQL 10 released

**URL:** https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536
**Category:** Announcements
**Tags:** docker
**Created:** [April 4, 2018, 7:08am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536 "2018-04-04T07:08:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 4, 2018, 7:08am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/1 "2018-04-04T07:08:40Z")

</div>

`launcher` has been updated to use the new [Docker base image](https://hub.docker.com/r/discourse/base/tags/) and [postgres.template.yml](https://github.com/discourse/discourse_docker/blob/44f132443bdf72dccf07111832de4c15b5e8abf8/templates/postgres.template.yml) which would use PostgreSQL 10 by default instead of Postgres 9.5.

As long as your container’s config is using the default `postgres.template.yml`, the upgrade of the PostgreSQL data directory would happen automatically the next time you do a `./launcher rebuild`. In the event that the PostgreSQL data directory fails to upgrade, please follow the instructions printed by `./launcher rebuild` or you may refer to the instructions in this [template](https://github.com/discourse/discourse_docker/blob/44f132443bdf72dccf07111832de4c15b5e8abf8/templates/postgres.template.yml#L80-L114). If following the instructions does not work for you, please post the full log of `./launcher rebuild` here so that we can help you restore your instance into a working state.

---

<div class="post-metadata">

### Author: ![blattersturm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blattersturm/32/76134_2.png) [@blattersturm](https://meta.discourse.org/u/blattersturm)
#### Post date: [April 14, 2018, 6:08pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/2 "2018-04-14T18:08:46Z")

</div>

```plaintext
I, [2018-04-14T18:05:10.944387 #15] INFO -- : Upgrading PostgreSQL from version 9.5 to 10
WARNING: Upgrading PostgresSQL would require an addtional 19M of disk space
Please free up some space, or expand your disk, before continuing.

```

Earlier I got an error saying ‘requiring addtional(sic) 21M of disk space’, I made 2GB of additional space, and now it still wants 19 MB.

How much disk space does this process need? In addition, I can’t easily expand disk space on this physical server whatsoever, nor free up much more either (uploads/data use practically all disk space).

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 14, 2018, 7:17pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/3 "2018-04-14T19:17:22Z")

</div>

Is this a bug in the space check @tgxworld?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 14, 2018, 11:35pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/4 "2018-04-14T23:35:51Z")

</div>

Can you provide me with the output of `df -h`?

---

<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: [April 23, 2018, 10:03pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/9 "2018-04-23T22:03:49Z")

</div>

If data and web containers are separate is something like this going to work? And is there anything special if it’s multisite?

```sh
./launcher rebuild data
./launcher rebuild multi

```

Also, I don’t know if you ever got an answer on this so I partitioned a disk in 100, 1000, 10000, 100000 MB.

```plaintext
df -h *
Filesystem Size Used Avail Use% Mounted on
/dev/sdd4 96G 60M 92G 1% /media/pfaffman/1303298c-1357-4534-a616-ffc24f4d35dd
/dev/sdd1 93M 1.6M 85M 2% /media/pfaffman/14d764e1-d27d-4961-91e8-815fd0b84be9
/dev/sdd2 969M 1.3M 902M 1% /media/pfaffman/4b61b56c-8730-420a-b3b9-9e50e273e3a2
/dev/sdd3 9.5G 22M 9.0G 1% /media/pfaffman/b3bb897d-57e9-403f-ab96-fe89386c8592
/dev/sdb3 46G 26G 19G 59% /
/dev/sr0 49M 49M 0 100% /media/pfaffman/SAMSUNG SSD

```

And here it is without `-h`

```plaintext
pfaffman@balloon:/media/pfaffman$ df *
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdd4 100660656 61044 95463228 1% /media/pfaffman/1303298c-1357-4534-a616-ffc24f4d35dd
/dev/sdd1 95054 1550 86336 2% /media/pfaffman/14d764e1-d27d-4961-91e8-815fd0b84be9
/dev/sdd2 991512 1264 922664 1% /media/pfaffman/4b61b56c-8730-420a-b3b9-9e50e273e3a2
/dev/sdd3 9948012 22488 9397140 1% /media/pfaffman/b3bb897d-57e9-403f-ab96-fe89386c8592
/dev/sdb3 47930248 26550824 18921620 59% /
/dev/sr0 49780 49780 0 100% /media/pfaffman/SAMSUNG SSD

```

Here’s what someone (I don’t think it was me) did for the space check in `discourse-setup`

```
  free_disk="$(df /var | tail -n 1 | awk '{print $4}')"

```

---

<div class="post-metadata">

### Author: ![ixeft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ixeft/32/115485_2.png) [@ixeft](https://meta.discourse.org/u/ixeft)
#### Post date: [April 23, 2018, 10:11pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/10 "2018-04-23T22:11:48Z")

</div>

Other problem with this new base image :

We noticed that `./launcher rebuild` with postgres 10 fail when the variable LANG is setted to fr\_FR.UTF8 in app.yml. postgres just won’t boot up.

It wasn’t the case with postgres 9.5, but maybe we shouldn’t have changed the locale (in this case, it might not be useful to put in the sample app.yml this env variable)

---

<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: [April 23, 2018, 11:14pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/11 "2018-04-23T23:14:24Z")

</div>

> [@ixeft](#):
>
> ./launcher rebuild with postgres 10 fail when the variable LANG is setted to fr\_FR.UTF8 in app.yml. postgres just won’t boot up.

@tgxworld can you give this a shot?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 23, 2018, 11:36pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/12 "2018-04-23T23:36:00Z")

</div>

> [@pfaffman](#):
>
> And here it is without -h

Is there somewhere using the `-h` option? I’m not sure why this is a concern.

> [@pfaffman](#):
>
> If data and web containers are separate is something like this going to work? And is there anything special if it’s multisite?

As long as you’re using the `postgres.template.yml`, the upgrade will work.

---

<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: [April 23, 2018, 11:40pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/14 "2018-04-23T23:40:15Z")

</div>

> [@tgxworld](#):
>
> Is there somewhere using the -h option? I’m not sure why this is a concern.

I thought that you were using `-h` at some point, because

> [@tgxworld](#):
>
> Can you provide me with the output of `df -h`?

But maybe you fixed the error described above:(that suggested there was a problem detecting disk space correctly) already and I missed it. Sorry if my post was confusing and not helpful.

> [@blattersturm](#):
>
> Earlier I got an error saying ‘requiring addtional(sic) 21M of disk space’, I made 2GB of additional space, and now it still wants 19 MB.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 23, 2018, 11:50pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/15 "2018-04-23T23:50:44Z")

</div>

> [@pfaffman](#):
>
> I thought that you were using -h at some point

I wanted to see the user’s disk space usage and `-h` makes it easier to read for me. The source code always has the answer 😉

> <https://github.com/discourse/discourse_docker/blob/56032fc353419695f0ddae20884f83da61dccf88/templates/postgres.template.yml#L64>

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 26, 2018, 2:38am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/16 "2018-04-26T02:38:21Z")

</div>

> [@ixeft](#):
>
> but maybe we shouldn’t have changed the locale (in this case, it might not be useful to put in the sample app.yml this env variable)

Hmm that is a good point actually. @sam Do you know if Discourse search would be affected if the LANG is configured differently? Otherwise, I think we should just bake the ENV into `postgres.template.yml`.

---

<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: [April 26, 2018, 2:40am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/17 "2018-04-26T02:40:31Z")

</div>

> [@tgxworld](#):
>
> Do you know if Discourse search would be affected if the LANG is configured differently

Yeah you basically want fulltext search to be configured with the right defaults otherwise the tokenizer does not work right and search results suffer. Changing this after the fact is real hard.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [April 26, 2018, 3:47am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/18 "2018-04-26T03:47:21Z")

</div>

You can try rebuilding again with

[https://github.com/discourse/discourse\_docker/commit/d4eb8c3f5b73c0e46cd7ad784567fe811641cd50](https://github.com/discourse/discourse_docker/commit/d4eb8c3f5b73c0e46cd7ad784567fe811641cd50)

but do note that the upgrade will fail if you change the locale when trying to upgrade. You’ll then need to upgrade postgres via `pg_dump`, there will be instructions printed when the upgrade fails.

---

<div class="post-metadata">

### Author: ![ixeft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ixeft/32/115485_2.png) [@ixeft](https://meta.discourse.org/u/ixeft)
#### Post date: [April 26, 2018, 10:42am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/19 "2018-04-26T10:42:44Z")

</div>

Everything went well when rebuilding with fr\_FR locale, thank for the fix 🙂

> [@sam](#):
>
> Yeah you basically want fulltext search to be configured with the right defaults otherwise the tokenizer does not work right and search results suffer. Changing this after the fact is real hard.

So I assume that the search will be less good for the few days we used the wrong local ? Is that the only downside ? Good to have this information about the LANG variable.

---

<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: [April 26, 2018, 10:45am UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/20 "2018-04-26T10:45:36Z")

</div>

I think we need to test this cause we changed stuff over the years and it may no longer be a big issue. The bottom line is that we want pg using french stop words and french snowball when tokenizing for search, now I think we have a bunch of internal changed that help force things but we may have missed some spots. Setting to fr\_FR is safest but it _may_ not be needed.

---

<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: [June 1, 2018, 10:30pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/21 "2018-06-01T22:30:58Z")

</div>

I found what might have been the problem above. I did an upgrade of a huge database on a small disk yesterday and that `free_disk` check fails if `/shared` isn’t the same partition as `/`.

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

---

<div class="post-metadata">

### Author: ![snakeninny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/snakeninny/32/115522_2.png) [@snakeninny](https://meta.discourse.org/u/snakeninny)
#### Post date: [June 23, 2018, 2:38pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/22 "2018-06-23T14:38:56Z")

</div>

My [website](http://iosre.com) is not accessible after `./launcher rebuild app` and here’s the [full log](https://pastebin.com/AaeAEae8). Thank you!

---

<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: [June 23, 2018, 3:03pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/23 "2018-06-23T15:03:24Z")

</div>

The rebuild is looking good. Are you sure it’s not your reverse proxy?

Because Discourse is definitely up and running [http://bbs.iosre.com:30080](http://bbs.iosre.com:30080)

---

<div class="post-metadata">

### Author: ![snakeninny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/snakeninny/32/115522_2.png) [@snakeninny](https://meta.discourse.org/u/snakeninny)
#### Post date: [June 23, 2018, 3:19pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/24 "2018-06-23T15:19:48Z")

</div>

> [@Falco](#):
>
> Are you sure it’s not your reverse proxy?

I’m not sure; how do I diagnose that? Before `rebuild`, everything worked as expected though

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [June 23, 2018, 7:15pm UTC](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536/25 "2018-06-23T19:15:00Z")

</div>

Did you rebuild twice? On my localhost a first rebuild updated Postgres, and a second was needed to get things copacetic.

[Next page](https://meta.discourse.org/t/docker-base-image-with-postgresql-10-released/84536.md?page=2)
