Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: 'Build Postgres Image for linux/amd64'
run: |
docker build \
docker buildx build \
-f Dockerfile${{ inputs.version }}.postgres \
--platform linux/amd64 \
-t ghcr.io/trycompa/postgres:${{ inputs.tag }}-linux-amd64 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: docker
strategy:
matrix:
version: [14, 15, 16]
version: [16, 17]
uses: ./.github/workflows/_docker.yml
with:
version: "${{ matrix.version }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: docker
strategy:
matrix:
version: [14, 15, 16]
version: [16, 17]
uses: ./.github/workflows/_docker.yml
with:
version: "${{ matrix.version }}"
Expand Down
22 changes: 0 additions & 22 deletions Dockerfile15.postgres

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile16.postgres
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Same major version as production
FROM imresamu/postgis:16-3.4
FROM imresamu/postgis:16-3.4.3-bookworm
LABEL org.opencontainers.image.source="https://github.com/trycompa/docker-postgres"


Expand Down
6 changes: 3 additions & 3 deletions Dockerfile14.postgres → Dockerfile17.postgres
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Same major version as production
FROM imresamu/postgis:14-3.4
FROM imresamu/postgis:17-3.5.1-bookworm
LABEL org.opencontainers.image.source="https://github.com/trycompa/docker-postgres"


# Install build dependencies and pgvector
RUN apt-get update && apt-get install -y \
build-essential \
git \
postgresql-server-dev-14 \
postgresql-server-dev-17 \
&& git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git \
&& cd pgvector \
&& make OPTFLAGS="" \
&& make install \
&& cd .. \
&& rm -rf pgvector \
&& apt-get remove -y build-essential git postgresql-server-dev-14 \
&& apt-get remove -y build-essential git postgresql-server-dev-17 \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

Expand Down
30 changes: 30 additions & 0 deletions docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

#!/usr/bin/env bash
set -eou pipefail
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/" &> /dev/null && pwd )"

cd "$ROOT"

versions=("16" "17")

for version in "${versions[@]}"; do
# linux/amd64
docker buildx build \
--platform linux/amd64 \
-f "Dockerfile$version.postgres" \
-t "postgres:$version-linux-amd64" \
.

# linux/amd64
docker buildx build \
--platform linux/arm64 \
-f "Dockerfile$version.postgres" \
-t "postgres:$version-linux-arm64" \
.

docker buildx build \
--platform linux/amd64,linux/arm64 \
-f "Dockerfile$version.postgres" \
-t "postgres:$version" \
.
done
Loading