Fix dockerfile to remove pg14 and include pg17

pull/7922/head
naisila 2025-03-12 12:42:22 +03:00
parent 52bf7a1d03
commit 10f1a50f1f
2 changed files with 11 additions and 13 deletions

View File

@ -6,9 +6,12 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# install build tools # install build tools
RUN apt update && apt install -y \ RUN apt update && apt install -y \
bison \
bzip2 \ bzip2 \
cpanminus \ cpanminus \
curl \ curl \
docbook-xml \
docbook-xsl \
flex \ flex \
gcc \ gcc \
git \ git \
@ -20,6 +23,7 @@ RUN apt update && apt install -y \
libreadline-dev \ libreadline-dev \
libselinux1-dev \ libselinux1-dev \
libssl-dev \ libssl-dev \
libxml2-utils \
libxslt-dev \ libxslt-dev \
libzstd-dev \ libzstd-dev \
locales \ locales \
@ -32,6 +36,7 @@ RUN apt update && apt install -y \
sudo \ sudo \
uuid-dev \ uuid-dev \
valgrind \ valgrind \
xsltproc \
zlib1g-dev \ zlib1g-dev \
&& add-apt-repository ppa:deadsnakes/ppa -y \ && add-apt-repository ppa:deadsnakes/ppa -y \
&& apt install -y \ && apt install -y \
@ -67,18 +72,6 @@ ENV PATH="/home/citus/.pgenv/pgsql/bin:${PATH}"
USER citus USER citus
# build postgres versions separately for effective parrallelism and caching of already built versions when changing only certain versions # build postgres versions separately for effective parrallelism and caching of already built versions when changing only certain versions
FROM base AS pg14
RUN MAKEFLAGS="-j $(nproc)" pgenv build 14.15
RUN rm .pgenv/src/*.tar*
RUN make -C .pgenv/src/postgresql-*/ clean
RUN make -C .pgenv/src/postgresql-*/src/include install
# create a staging directory with all files we want to copy from our pgenv build
# we will copy the contents of the staged folder into the final image at once
RUN mkdir .pgenv-staging/
RUN cp -r .pgenv/src .pgenv/pgsql-* .pgenv/config .pgenv-staging/
RUN rm .pgenv-staging/config/default.conf
FROM base AS pg15 FROM base AS pg15
RUN MAKEFLAGS="-j $(nproc)" pgenv build 15.10 RUN MAKEFLAGS="-j $(nproc)" pgenv build 15.10
RUN rm .pgenv/src/*.tar* RUN rm .pgenv/src/*.tar*
@ -205,9 +198,9 @@ RUN git clone https://github.com/so-fancy/diff-so-fancy.git \
COPY --link --from=uncrustify-builder /uncrustify/usr/ /usr/ COPY --link --from=uncrustify-builder /uncrustify/usr/ /usr/
COPY --link --from=pg14 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
COPY --link --from=pg15 /home/citus/.pgenv-staging/ /home/citus/.pgenv/ COPY --link --from=pg15 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
COPY --link --from=pg16 /home/citus/.pgenv-staging/ /home/citus/.pgenv/ COPY --link --from=pg16 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
COPY --link --from=pg17 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
COPY --link --from=pipenv /home/citus/.local/share/virtualenvs/ /home/citus/.local/share/virtualenvs/ COPY --link --from=pipenv /home/citus/.local/share/virtualenvs/ /home/citus/.local/share/virtualenvs/

View File

@ -16,6 +16,11 @@ on:
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps: steps:
- -
name: Docker meta name: Docker meta