Copy /usr/local/ also
Some checks failed
/ build-general (push) Successful in 3m14s
/ build-base (push) Failing after 24s

This commit is contained in:
Ryan Voots 2025-05-08 12:29:45 -04:00
parent d5740c480d
commit 4ffe8bc943
2 changed files with 83 additions and 8 deletions

View file

@ -1,15 +1,24 @@
on:
push:
matrix:
PG_MAJOR_VERSION:
- 17
DEB_RELEASE:
- bookworm
POSTGIS_VERSiON:
- 3.5.2
TO<ESCALEDB_VERSION:
- 2.19.3
HYPOPG_VERSION:
-
PGVECTOR_VERSION:
-
jobs:
build-base:
strategy:
fail_fast: false
matrix:
PG_MAJOR_VERSION:
- 17
DEB_RELEASE:
- bookworm
runs-on: self-hosted
steps:
- name: Setup metadata
@ -50,3 +59,51 @@ jobs:
DEB_RELEASE=${{ matrix.DEB_RELEASE }}
FMT_DATE=${{ env.FMT_DATE }}
build-general:
strategy:
fail_fast: false
runs-on: self-hosted
steps:
- name: Setup metadata
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.simcop2387.info/simcop2387/postgresql-container-general
tags: |
type=raw,value=${{ matrix.PG_MAJOR_VERSION }}-${{ matrix.DEB_RELEASE }}
type=raw,value=${{ matrix.PG_MAJOR_VERSION }}-${{ matrix.DEB_RELEASE }}-${{ matrix.POSTGIS_VERSiON }}-${{ matrix.TO<ESCALEDB_VERSION }}-${{ matrix.HYPOPG_VERSION }}-${{ matrix.PGVECTOR_VERSION }}
type=raw,value=${{ matrix.PG_MAJOR_VERSION }}-${{ matrix.DEB_RELEASE }}-${{ matrix.POSTGIS_VERSiON }}-${{ matrix.TO<ESCALEDB_VERSION }}-${{ matrix.HYPOPG_VERSION }}-${{ matrix.PGVECTOR_VERSION }}-{{ date 'YYYY-MM-DD' }}
- name: checkout
uses: actions/checkout@v4
- name: buildx-base
uses: https://github.com/docker/setup-buildx-action@v3
- name: setup formatted date
run: echo $( date -I ) ; echo FMT_DATE=$( date -I ) >> $GITHUB_ENV
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
registry: gitea.simcop2387.info
username: simcop2387
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: https://github.com/docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: general/
dockerfile: general/Dockerfile
build-args: |
PG_MAJOR_VERSION=${{ matrix.PG_MAJOR_VERSION }}
DEB_RELEASE=${{ matrix.DEB_RELEASE }}
FMT_DATE=${{ env.FMT_DATE }}
POSTGIS_VERSiON=${{ matrix.POSTGIS_VERSiON }}
TO<ESCALEDB_VERSION=${{ matrix.TO<ESCALEDB_VERSION }}
HYPOPG_VERSION=${{ matrix.HYPOPG_VERSION }}
PGVECTOR_VERSION=${{ matrix.PGVECTOR_VERSION }}

View file

@ -6,16 +6,28 @@ ARG BASE_IMAGE_TAG=${PG_MAJOR_VERSION}-${DEB_RELEASE}-${FMT_DATE}
FROM gitea.simcop2387.info/simcop2387/postgresql-container-base:${BASE_IMAGE_TAG} AS pgbuilder
ARG POSTGIS_VERSION=
ARG POSTGIS_VERSION=3.5.2
ARG PGVECTOR_VERSION=
ARG PGXN_VERSION=
ARG TIMESCALEDB_VERSION=2.19.3
ARG HYPOPG_VERSION=
RUN apt update && apt install -y build-essential flex bison git yacc cmake
RUN apt update && apt install -y build-essential flex bison git yacc cmake \
docbook-xsl-ns \
gettext \
libgdal-dev \
libgeos-dev \
libjson-c-dev \
libproj-dev \
libprotobuf-c-dev \
libsfcgal-dev \
libxml2-dev \
libxml2-utils \
protobuf-c-compiler \
xsltproc
RUN mkdir -p /build/
RUN git clone https://github.com/timescale/timescaledb -b ${TIMESCALEDB_VERSION} /build/timescale/
RUN git clone https://github.com/timescale/timescaledb --depth=1 --recursive -b ${TIMESCALEDB_VERSION} /build/timescale/
WORKDIR /build/timescale/
RUN ./bootstrap
RUN cd build && make -j && make install
@ -23,7 +35,13 @@ RUN cd build && make -j && make install
# TODO UPDATE PGCONFIG
# shared_preload_libraries = 'timescaledb'
WORKDIR /build
RUN git clone https://github.com/postgis/postgis --depth=1 --recursive -b ${POSTGIS_VERSION} /build/postgis/
WORKDIR /build/postgis
RUN ./autogen.sh && ./configure --enable-lto && make -j && make install
FROM gitea.simcop2387.info/simcop2387/postgresql-container-base:${BASE_IMAGE_TAG}
COPY --from=pgbuilder /usr/share/postgresql/ /usr/share/posrgresql/
COPY --from=pgbuilder /usr/lib/postgresql/ /usr/lib/postgresql/
COPY --from=pgbuilder /usr/local/ /usr/local/