Skip to content

Commit 61b1cd5

Browse files
committed
Hard-pin Python requirements
1 parent 0c0a53d commit 61b1cd5

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git
2+
.github
3+
Dockerfile

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ENV LANG=en_US.utf8 \
1313
LC_ALL=en_US.utf8 \
1414
PGDATA=/var/lib/postgresql/data
1515

16+
COPY . /
17+
1618
RUN apk update \
1719
&& apk add --no-cache bash ca-certificates cyrus-sasl icu-libs libedit libffi libintl llvm11 openssl perl python3 tzdata \
1820
&& apk add --no-cache --virtual devdeps asciidoc autoconf automake bison bzip2 clang cmake coreutils curl cyrus-sasl-dev expat-dev flex curl gcc g++ gdbm gettext-dev git icu-dev libc-dev libedit-dev libffi-dev libtool libxml2-dev libxslt-dev linux-headers llvm11-dev make musl-dev openssl-dev patch perl-dev python3-dev unzip util-linux-dev xmlto zlib-dev \
@@ -35,12 +37,11 @@ RUN apk update \
3537
&& PYTHON=/usr/bin/python3 ./configure --disable-rpath --prefix=/usr --mandir=/usr/share/man --with-includes=/usr/local/include --with-libraries=/usr/local/lib --with-icu --with-llvm --with-openssl --with-python --with-system-tzdata=/usr/share/zoneinfo --with-uuid=ossp \
3638
&& make -j "$(getconf _NPROCESSORS_ONLN)" world && make install \
3739
&& make -j "$(getconf _NPROCESSORS_ONLN)" -C contrib install \
40+
&& pip3 --no-color --no-cache-dir -qq install -r /requirements.txt \
3841
&& cd /tmp \
3942
&& perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit' \
4043
&& PERL_MM_USE_DEFAULT=1 cpan -T TAP::Harness::JUnit \
4144
&& PERL_MM_USE_DEFAULT=1 cpan -T TAP::Parser::SourceHandler::pgTAP \
42-
&& pip3 --no-color --no-cache-dir -qq install pgxnclient \
43-
&& pip3 --no-color --no-cache-dir -qq install pglifecycle==${PGLIFECYCLE_VERSION} \
4445
&& pgxn install pgtap==${PGTAP_VERSION} \
4546
&& git clone https://github.com/okbob/plpgsql_check.git -b v${PLPGSQL_CHECK_VERSION} \
4647
&& cd plpgsql_check \
@@ -67,13 +68,11 @@ RUN apk update \
6768
/usr/local/include/* \
6869
/usr/local/share/doc \
6970
/usr/local/share/man \
70-
/usr/lib/python3.8/__pycache__/* \
71-
/usr/lib/python3.8/*/__pycache__/* \
71+
/usr/lib/python3.*/__pycache__/* \
72+
/usr/lib/python3.*/*/__pycache__/* \
7273
/tmp/* \
7374
&& find /usr/local -name '*.a' -delete
7475

75-
COPY docker-entrypoint.sh /
76-
7776
VOLUME ["/docker-entrypoint-initdb.d"]
7877
EXPOSE 5432
7978
HEALTHCHECK CMD pg_isready

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018-2020 Gavin M. Roy
1+
Copyright (c) 2018-2021 Gavin M. Roy
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pgdumplib==2.1.0
2+
pglast==1.17
3+
pglifecycle==1.0.0a3
4+
pgxnclient==1.3.1

0 commit comments

Comments
 (0)