From ddb6b3aaa7b1b06c09063d1b397bf046e5f89ad4 Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 08:07:06 +0000 Subject: [PATCH 1/8] Changement de la gestion des permissions --- 9.6/docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index 354aa3405f..2a162a1754 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -31,7 +31,7 @@ fi if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then mkdir -p "$PGDATA" chown -R postgres "$PGDATA" - chmod 700 "$PGDATA" + chmod 777 "$PGDATA" mkdir -p /var/run/postgresql chown -R postgres /var/run/postgresql @@ -41,7 +41,7 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then if [ "$POSTGRES_INITDB_XLOGDIR" ]; then mkdir -p "$POSTGRES_INITDB_XLOGDIR" chown -R postgres "$POSTGRES_INITDB_XLOGDIR" - chmod 700 "$POSTGRES_INITDB_XLOGDIR" + chmod 777 "$POSTGRES_INITDB_XLOGDIR" fi exec gosu postgres "$BASH_SOURCE" "$@" @@ -50,7 +50,7 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - chmod 700 "$PGDATA" 2>/dev/null || : + chmod 777 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then From 53e921ad925bfd4974e83f14a25d0ce9270ad73a Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 09:08:58 +0000 Subject: [PATCH 2/8] Change URL keyserver --- 9.6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index b3fc279a9d..df91723d30 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex; \ # uid PostgreSQL Debian Repository key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'; \ export GNUPGHOME="$(mktemp -d)"; \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \ gpg --export "$key" > /etc/apt/trusted.gpg.d/postgres.gpg; \ rm -r "$GNUPGHOME"; \ apt-key list From a5cfbdb8e92cb8cc85948bddff2020c76c0e7f8c Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 09:25:50 +0000 Subject: [PATCH 3/8] Change URL keyserver --- 9.6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index df91723d30..a3056b1822 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -11,7 +11,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ From c77427d13ffc3342ccbde38f176f14e68fab8102 Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 11:22:34 +0000 Subject: [PATCH 4/8] Modif user add uid 1001 --- 9.6/Dockerfile | 2 +- 9.6/docker-entrypoint.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index a3056b1822..9391357c14 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -2,7 +2,7 @@ FROM debian:jessie # explicitly set user/group IDs -RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres +RUN groupadd -r postgres --gid=1001 && useradd -r -g postgres --uid=1001 postgres # grab gosu for easy step-down from root ENV GOSU_VERSION 1.7 diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index 2a162a1754..3bd9b8fc06 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -1,6 +1,9 @@ #!/bin/bash set -e +# CHMOD modification + + # usage: file_env VAR [DEFAULT] # ie: file_env 'XYZ_DB_PASSWORD' 'example' # (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of From 0db6ac25515ce72f366969d0f45136fec010f793 Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 13:06:28 +0000 Subject: [PATCH 5/8] Modif chmod to 700 --- 9.6/docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index 3bd9b8fc06..f6c26cad1e 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -34,7 +34,7 @@ fi if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then mkdir -p "$PGDATA" chown -R postgres "$PGDATA" - chmod 777 "$PGDATA" + chmod 700 "$PGDATA" mkdir -p /var/run/postgresql chown -R postgres /var/run/postgresql @@ -44,7 +44,7 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then if [ "$POSTGRES_INITDB_XLOGDIR" ]; then mkdir -p "$POSTGRES_INITDB_XLOGDIR" chown -R postgres "$POSTGRES_INITDB_XLOGDIR" - chmod 777 "$POSTGRES_INITDB_XLOGDIR" + chmod 700 "$POSTGRES_INITDB_XLOGDIR" fi exec gosu postgres "$BASH_SOURCE" "$@" @@ -53,7 +53,7 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - chmod 777 "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then From 98a065f319bc2ee9486ac4877e9322d3fe241336 Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 13:35:34 +0000 Subject: [PATCH 6/8] Modif keyserv --- 9.6/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index 9391357c14..8e1f106a1a 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -11,7 +11,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --keyserver hkp://ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ @@ -31,7 +31,7 @@ RUN set -ex; \ # uid PostgreSQL Debian Repository key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'; \ export GNUPGHOME="$(mktemp -d)"; \ - gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \ + gpg --keyserver hkp://ha.pool.sks-keyservers.net --recv-keys "$key"; \ gpg --export "$key" > /etc/apt/trusted.gpg.d/postgres.gpg; \ rm -r "$GNUPGHOME"; \ apt-key list From 8fc7cf4d50b92403436a3e7e396292393b80f44c Mon Sep 17 00:00:00 2001 From: medzila Date: Thu, 4 May 2017 14:11:36 +0000 Subject: [PATCH 7/8] Change keyserver --- 9.6/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index 8e1f106a1a..9391357c14 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -11,7 +11,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver hkp://ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ @@ -31,7 +31,7 @@ RUN set -ex; \ # uid PostgreSQL Debian Repository key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'; \ export GNUPGHOME="$(mktemp -d)"; \ - gpg --keyserver hkp://ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \ gpg --export "$key" > /etc/apt/trusted.gpg.d/postgres.gpg; \ rm -r "$GNUPGHOME"; \ apt-key list From 8620739c3e70d2c7319e049c7567a67ac52e1216 Mon Sep 17 00:00:00 2001 From: medzila Date: Fri, 5 May 2017 11:43:28 +0000 Subject: [PATCH 8/8] Change readme --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 3b0fa322ce..69950a6565 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ # About this Repo -This is the Git repo of the Docker [official image](https://docs.docker.com/docker-hub/official_repos/) for [postgres](https://registry.hub.docker.com/_/postgres/). See [the Docker Hub page](https://registry.hub.docker.com/_/postgres/) for the full readme on how to use this Docker image and for information regarding contributing and issues. - -The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/postgres](https://github.com/docker-library/docs/tree/master/postgres). - -See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/postgres" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/postgres), especially [PRs with the "library/postgres" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fpostgres). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). +This is a fork from the Git repo of the Docker [official image](https://docs.docker.com/docker-hub/official_repos/) for [postgres](https://registry.hub.docker.com/_/postgres/). See [the Docker Hub page](https://registry.hub.docker.com/_/postgres/) for the full readme on how to use this Docker image and for information regarding contributing and issues. ---