Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/postgresql:12-20.04-fix-gosu-drop into ~ubuntu-docker-images/ubuntu-docker-images/+git/postgresql:12-20.04

Proposed by Athos Ribeiro
Status: Merged
Merged at revision: 6d99b7424045df341ee251a8cfcd1d133c606738
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/postgresql:12-20.04-fix-gosu-drop
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/postgresql:12-20.04
Diff against target: 17 lines (+6/-0)
1 file modified
Dockerfile (+6/-0)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Paride Legovini Approve
Bryce Harrington Pending
Review via email: mp+404071@code.launchpad.net

Description of the change

Revert "Drop gosu"

    This reverts commit 13be7b289627c12f5751e9840015103c502cc69a.

    We need gosu because the entrypoint script uses it in order to restart
    the service.

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

I pushed a new change to remove the whole block restarting the script.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

After checking the commit logs for the other series, I realized installing gosu was re-introduced due to this very specific error this patch tries to fix.

Let's re-introduce gosu here for consistency instead.

Revision history for this message
Paride Legovini (paride) wrote :

LGTM, thanks!

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you, Athos. gosu has been fixed in Focal, so this LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Dockerfile b/Dockerfile
2index 29dbfa6..c576d7b 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -13,6 +13,12 @@ RUN set -eux; \
6 mkdir -p /var/lib/postgresql; \
7 chown -R postgres:postgres /var/lib/postgresql
8
9+RUN set -eux; \
10+ apt-get update; \
11+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gosu; \
12+ rm -rf /var/lib/apt/lists/*; \
13+ gosu nobody true
14+
15 # make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default
16 RUN set -eux; \
17 if [ -f /etc/dpkg/dpkg.cfg.d/docker ]; then \

Subscribers

People subscribed via source and target branches

to all changes: