Skip to content

Commit 155b819

Browse files
authored
Merge pull request #13 from jianxiaoguo/main
fixup(postgres): support arm, fix Failed to build psutil
2 parents 42bf8cf + fb8b00f commit 155b819

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ ENV PYTHON_VERSION="3.10.4" \
88

99
ENV PGDATA /data/${PG_MAJOR}
1010

11-
RUN install-stack python $PYTHON_VERSION \
11+
RUN install-packages gcc \
12+
&& install-stack python $PYTHON_VERSION \
1213
&& install-stack postgresql $POSTGRESQL_VERSION && . init-stack \
14+
&& set -eux; pip3 install --disable-pip-version-check --no-cache-dir psycopg[binary] patroni[kubernetes] 2>/dev/null; set +eux \
15+
&& apt-get purge -y --auto-remove gcc \
16+
&& apt-get autoremove -y \
17+
&& apt-get clean -y \
1318
&& rm -rf \
1419
/usr/share/doc \
1520
/usr/share/man \
@@ -26,8 +31,7 @@ RUN install-stack python $PYTHON_VERSION \
2631
&& mkdir -p /usr/share/man/man{1..8} \
2732
&& mkdir -p $PGDATA \
2833
&& groupadd postgres && useradd -g postgres postgres \
29-
&& chown -R postgres:postgres /data \
30-
&& set -eux; pip3 install --disable-pip-version-check --no-cache-dir psycopg[binary] patroni[kubernetes] 2>/dev/null
34+
&& chown -R postgres:postgres /data
3135

3236
USER postgres
3337
ENTRYPOINT ["init-stack", "/entrypoint.sh"]

0 commit comments

Comments
 (0)