Skip to content

Commit b0d084f

Browse files
committed
Use pg10 for custom container
1 parent 0967d41 commit b0d084f

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ env:
2626
- DOCKER_IMAGE=pathman/pg10_clang_check_code
2727
- DOCKER_IMAGE=pathman/pg10_cppcheck
2828
- DOCKER_IMAGE=pathman/pg10_pathman_tests
29-
- DOCKER_IMAGE=pathman/pg96_ca_clang_check_code
30-
- DOCKER_IMAGE=pathman/pg96_ca_cppcheck
31-
- DOCKER_IMAGE=pathman/pg96_ca_pathman_tests
29+
- DOCKER_IMAGE=pathman/pg10_ca_clang_check_code
30+
- DOCKER_IMAGE=pathman/pg10_ca_cppcheck
31+
- DOCKER_IMAGE=pathman/pg10_ca_pathman_tests

make_images.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,20 @@
1010
from urllib.request import urlopen
1111

1212
DOCKER_ID = 'pathman'
13-
ALPINE_BASE_URL = 'https://raw.githubusercontent.com/docker-library/postgres/master/9.6/alpine/'
13+
ALPINE_BASE_URL = 'https://raw.githubusercontent.com/docker-library/postgres/master/10/alpine/'
1414
ALPINE_ENTRYPOINT = 'docker-entrypoint.sh'
1515
ALPINE_PATCH = b'''
16-
diff --git a/Dockerfile b/Dockerfile
17-
index 9878023..ba215bc 100644
18-
--- a/Dockerfile
19-
+++ b/Dockerfile
20-
@@ -80,6 +80,7 @@ RUN set -ex \\
21-
# configure options taken from:
22-
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
23-
&& ./configure \\
16+
--- Dockerfile 2017-07-25 12:43:20.424984422 +0300
17+
+++ Dockerfile 2017-07-25 12:46:10.279267520 +0300
18+
@@ -86,6 +86,7 @@
19+
--enable-integer-datetimes \\
20+
--enable-thread-safety \\
21+
--enable-tap-tests \\
2422
+ --enable-cassert \\
25-
--build="$gnuArch" \\
26-
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
27-
# --enable-nls \\
23+
# skip debugging info -- we want tiny size instead
24+
# --enable-debug \\
25+
--disable-rpath \\
26+
2827
'''
2928
CUSTOM_IMAGE_NAME = "%s/postgres_stable" % DOCKER_ID
3029

@@ -34,16 +33,20 @@ def make_alpine_image(image_name):
3433

3534
with tempfile.TemporaryDirectory() as tmpdir:
3635
print("Creating build in %s" % tmpdir)
36+
patch_name = os.path.join(tmpdir, "cassert.patch")
37+
3738
with open(os.path.join(tmpdir, 'Dockerfile'), 'w') as f:
3839
f.write(dockerfile.decode())
3940

4041
with open(os.path.join(tmpdir, ALPINE_ENTRYPOINT), 'w') as f:
4142
f.write(entrypoint_sh.decode())
4243

43-
with open(os.path.join(tmpdir, 'cassert.patch'), 'w') as f:
44+
with open(patch_name, 'w') as f:
4445
f.write(ALPINE_PATCH.decode())
4546

46-
subprocess.check_output(["git", "apply", "cassert.patch"], cwd=tmpdir)
47+
with open(patch_name, 'r') as f:
48+
p = subprocess.Popen(["patch", "-p0"], cwd=tmpdir, stdin=subprocess.PIPE)
49+
p.communicate(str.encode(f.read()))
4750
print("patch applied")
4851
subprocess.check_output(["docker", "build", ".", '-t', image_name], cwd=tmpdir)
4952
print("build ok: ", image_name)
@@ -57,7 +60,7 @@ def make_alpine_image(image_name):
5760
('pg95', 'postgres:9.5-alpine'),
5861
('pg96', 'postgres:9.6-alpine'),
5962
('pg10', 'postgres:10-alpine'),
60-
('pg96_ca', CUSTOM_IMAGE_NAME),
63+
('pg10_ca', CUSTOM_IMAGE_NAME),
6164
]
6265

6366
image_types = {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy