Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update postgres #5796

Merged
merged 1 commit into from
Apr 24, 2019
Merged

Conversation

tianon
Copy link
Member

@tianon tianon commented Apr 24, 2019

Changes:

Changes:

- docker-library/postgres@e521526: Remove "backwards compatibility" entrypoint symlink in 12+
- docker-library/postgres@03db72f: Remove UUID variability now that 9.3 is gone (per comment in "update.sh")
- docker-library/postgres@59e5a64: Merge pull request docker-library/postgres#568 from infosiftr/pr-309
- docker-library/postgres@85aadc0: Move end of line comment to its own line to improve readability
@yosifkit
Copy link
Member

Diff:
diff --git a/postgres_10-alpine/Dockerfile b/postgres_10-alpine/Dockerfile
index 7233e82..c1e0078 100644
--- a/postgres_10-alpine/Dockerfile
+++ b/postgres_10-alpine/Dockerfile
@@ -141,7 +141,8 @@ RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/pos
 RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
 
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_10/Dockerfile b/postgres_10/Dockerfile
index 4bfc956..a3b460e 100644
--- a/postgres_10/Dockerfile
+++ b/postgres_10/Dockerfile
@@ -164,7 +164,8 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres
 
 ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_9-alpine/Dockerfile b/postgres_9-alpine/Dockerfile
index 06039a1..8a34236 100644
--- a/postgres_9-alpine/Dockerfile
+++ b/postgres_9-alpine/Dockerfile
@@ -139,7 +139,8 @@ RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/pos
 RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
 
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_9.4-alpine/Dockerfile b/postgres_9.4-alpine/Dockerfile
index 0a75382..93e0a2d 100644
--- a/postgres_9.4-alpine/Dockerfile
+++ b/postgres_9.4-alpine/Dockerfile
@@ -139,7 +139,8 @@ RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/pos
 RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
 
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_9.4/Dockerfile b/postgres_9.4/Dockerfile
index 03c92b5..41327c2 100644
--- a/postgres_9.4/Dockerfile
+++ b/postgres_9.4/Dockerfile
@@ -165,7 +165,8 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres
 
 ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_9.5-alpine/Dockerfile b/postgres_9.5-alpine/Dockerfile
index 81565f1..bdd4dde 100644
--- a/postgres_9.5-alpine/Dockerfile
+++ b/postgres_9.5-alpine/Dockerfile
@@ -139,7 +139,8 @@ RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/pos
 RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
 
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_9.5/Dockerfile b/postgres_9.5/Dockerfile
index e2ad04b..5e66d30 100644
--- a/postgres_9.5/Dockerfile
+++ b/postgres_9.5/Dockerfile
@@ -165,7 +165,8 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres
 
 ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_9/Dockerfile b/postgres_9/Dockerfile
index 39e0f9b..92291a3 100644
--- a/postgres_9/Dockerfile
+++ b/postgres_9/Dockerfile
@@ -165,7 +165,8 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres
 
 ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_alpine/Dockerfile b/postgres_alpine/Dockerfile
index dba1969..cf0cd0d 100644
--- a/postgres_alpine/Dockerfile
+++ b/postgres_alpine/Dockerfile
@@ -141,7 +141,8 @@ RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/pos
 RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
 
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/
diff --git a/postgres_latest/Dockerfile b/postgres_latest/Dockerfile
index 9ef6a1b..0d6062c 100644
--- a/postgres_latest/Dockerfile
+++ b/postgres_latest/Dockerfile
@@ -164,7 +164,8 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres
 
 ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
 ENV PGDATA /var/lib/postgresql/data
-RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
+RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
 VOLUME /var/lib/postgresql/data
 
 COPY docker-entrypoint.sh /usr/local/bin/

@yosifkit
Copy link
Member

Build test of #5796; 6effbc9; amd64 (postgres):

$ bashbrew build postgres:11.2
Building bashbrew/cache:abb6d0e8e9808202c36ee5dfd87241e83d6f7d7c622353ba27c5ae85ffde72e9 (postgres:11.2)
Tagging postgres:11.2
Tagging postgres:11
Tagging postgres:latest

$ test/run.sh postgres:11.2
testing postgres:11.2
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6]....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:11.2-alpine
Building bashbrew/cache:c5a20ebc5c8375e2952f92986035098eff0868b716f61765f03d992b32b3d9fc (postgres:11.2-alpine)
Tagging postgres:11.2-alpine
Tagging postgres:11-alpine
Tagging postgres:alpine

$ test/run.sh postgres:11.2-alpine
testing postgres:11.2-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6]....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:10.7
Building bashbrew/cache:1777f2851d17b3076217379a84e28dda5c7b40b0e824176c040e3d87ab8cb3df (postgres:10.7)
Tagging postgres:10.7
Tagging postgres:10

$ test/run.sh postgres:10.7
testing postgres:10.7
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6]....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:10.7-alpine
Building bashbrew/cache:3f6e3fc2c2f6be2b971cc9300ba5cbfaf4876d3ac191e7f1d47cb5434a70c12b (postgres:10.7-alpine)
Tagging postgres:10.7-alpine
Tagging postgres:10-alpine

$ test/run.sh postgres:10.7-alpine
testing postgres:10.7-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6]....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:9.6.12
Building bashbrew/cache:8a4068948dc74429cfd7d5b4e32e8ee281f508eb4c1ee9acb1389a932c42f84f (postgres:9.6.12)
Tagging postgres:9.6.12
Tagging postgres:9.6
Tagging postgres:9

$ test/run.sh postgres:9.6.12
testing postgres:9.6.12
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6]....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.6.12-alpine
Building bashbrew/cache:3fcb37f23f94f309405cb73db1f061b054b6becb5cdbbd1b812fbb9125056165 (postgres:9.6.12-alpine)
Tagging postgres:9.6.12-alpine
Tagging postgres:9.6-alpine
Tagging postgres:9-alpine

$ test/run.sh postgres:9.6.12-alpine
testing postgres:9.6.12-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:9.5.16
Building bashbrew/cache:46c7e611889ac2d25cc25d11935521f8ba1d07c9a4ca7a5111c2f8f974369160 (postgres:9.5.16)
Tagging postgres:9.5.16
Tagging postgres:9.5

$ test/run.sh postgres:9.5.16
testing postgres:9.5.16
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:9.5.16-alpine
Building bashbrew/cache:1363579e63385fa2d73e57767ccc7e2542af45d5d0e0f7acaabe9ec8ddd0fa53 (postgres:9.5.16-alpine)
Tagging postgres:9.5.16-alpine
Tagging postgres:9.5-alpine

$ test/run.sh postgres:9.5.16-alpine
testing postgres:9.5.16-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6]....passed
	'postgres-initdb' [6/6]....passed


$ bashbrew build postgres:9.4.21
Building bashbrew/cache:ea9fb36de17ea4b273875106d4e7a2b2f6ba622093e6ae0ca856f9d91046e32e (postgres:9.4.21)
Tagging postgres:9.4.21
Tagging postgres:9.4

$ test/run.sh postgres:9.4.21
testing postgres:9.4.21
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.4.21-alpine
Building bashbrew/cache:0ce1bc9fb56b4722e34522c737f29703b5f8dd3a10b0edca28beba51056512fc (postgres:9.4.21-alpine)
Tagging postgres:9.4.21-alpine
Tagging postgres:9.4-alpine

$ test/run.sh postgres:9.4.21-alpine
testing postgres:9.4.21-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed

@yosifkit yosifkit merged commit a28e345 into docker-library:master Apr 24, 2019
@yosifkit yosifkit deleted the postgres branch April 24, 2019 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants