Skip to content

Commit 65cf2c9

Browse files
committed
Add Postgres 12
- New default tag. - Update upstream entrypoint location, changed in docker-library/postgres#260. - Build only once in tests.
1 parent d4b6c8d commit 65cf2c9

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ stages:
3232

3333
env:
3434
global:
35-
- LATEST_RELEASE=11-alpine
35+
- LATEST_RELEASE=12-alpine
3636
- DOCKER_REPO=tecnativa/postgres-autoconf
3737
jobs:
3838
- DOCKER_TAG=9.6-alpine
3939
- DOCKER_TAG=10-alpine
4040
- DOCKER_TAG=11-alpine
41+
- DOCKER_TAG=12-alpine
4142

4243
jobs:
4344
include:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BASE_TAG
22
FROM docker.io/postgres:${BASE_TAG}
3-
ENTRYPOINT [ "/autoconf-entrypoint" ]
3+
ENTRYPOINT ["/autoconf-entrypoint", "/usr/local/bin/docker-entrypoint.sh"]
44
ENV CERTS="{}" \
55
CONF_EXTRA="" \
66
LAN_AUTH_METHOD=md5 \

autoconf-entrypoint

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,4 @@ permissions_fix(HBA_FILE)
128128

129129
# Continue normal execution
130130
args = sys.argv[1:]
131-
if not args or args[0] == "postgres" or args[0].startswith("-"):
132-
# Need to go through parent image entrypoint, and hardcode conf file
133-
args = ["/docker-entrypoint.sh", *args, "-cconfig_file={}".format(CONF_FILE)]
134131
os.execvp(args[0], args)

tests/test.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@
1616
class PostgresAutoconfCase(unittest.TestCase):
1717
"""Test behavior for this docker image"""
1818

19-
def setUp(self):
19+
@classmethod
20+
def setUpClass(cls):
2021
with local.cwd(local.cwd / ".."):
2122
print("Building image")
2223
local["./hooks/build"] & FG
24+
cls.image = "tecnativa/postgres-autoconf:{}".format(local.env["DOCKER_TAG"])
25+
cls.cert_files = {"client.ca.cert.pem", "server.cert.pem", "server.key.pem"}
26+
return super().setUpClass()
27+
28+
def setUp(self):
2329
docker("network", "create", "lan")
2430
docker("network", "create", "wan")
25-
self.version = os.environ["DOCKER_TAG"]
26-
self.image = ("tecnativa/postgres-autoconf:{}".format(self.version),)
27-
self.cert_files = {"client.ca.cert.pem", "server.cert.pem", "server.key.pem"}
2831
return super().setUp()
2932

3033
def tearDown(self):

0 commit comments

Comments
 (0)