From 101949343a3eb3187e61965289b82d8e42acbd5e Mon Sep 17 00:00:00 2001 From: Miha Rekar Date: Mon, 14 Oct 2024 14:09:02 +0200 Subject: [PATCH] Use postgres alpine images --- .github/workflows/build-and-push-images.yml | 13 +++++++------ Dockerfile | 4 ++-- README.md | 4 ++-- docker-compose.yaml | 8 ++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-push-images.yml b/.github/workflows/build-and-push-images.yml index 6b89df2..3554846 100644 --- a/.github/workflows/build-and-push-images.yml +++ b/.github/workflows/build-and-push-images.yml @@ -11,11 +11,12 @@ jobs: strategy: matrix: include: - - { postgres: 12, alpine: '3.12' } - - { postgres: 13, alpine: '3.14' } - - { postgres: 14, alpine: '3.16' } - - { postgres: 15, alpine: '3.17' } - - { postgres: 16, alpine: '3.19' } + - { postgres: 12 } + - { postgres: 13 } + - { postgres: 14 } + - { postgres: 15 } + - { postgres: 16 } + - { postgres: 17 } steps: - name: Checkout repository @@ -40,7 +41,7 @@ jobs: push: true tags: ${{ github.repository }}:${{ matrix.postgres }} build-args: | - ALPINE_VERSION=${{ matrix.alpine }} + POSTGRES_VERSION=${{ matrix.postgres }} platforms: | linux/amd64 linux/arm64 diff --git a/Dockerfile b/Dockerfile index 16915d7..0600430 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -ARG ALPINE_VERSION -FROM alpine:${ALPINE_VERSION} +ARG POSTGRES_VERSION +FROM postgres:${POSTGRES_VERSION}-alpine ARG TARGETARCH ADD src/install.sh install.sh diff --git a/README.md b/README.md index 67e2f99..7cd1d89 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,9 @@ docker exec sh restore.sh # Development ## Build the image locally -`ALPINE_VERSION` determines Postgres version compatibility. See [`build-and-push-images.yml`](.github/workflows/build-and-push-images.yml) for the latest mapping. +`POSTGRES_VERSION` determines Postgres version. ```sh -DOCKER_BUILDKIT=1 docker build --build-arg ALPINE_VERSION=3.14 . +DOCKER_BUILDKIT=1 docker build --build-arg POSTGRES_VERSION=17 . ``` ## Run a simple test environment with Docker Compose ```sh diff --git a/docker-compose.yaml b/docker-compose.yaml index 16ac481..d26e990 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,11 +12,11 @@ services: build: context: . args: - ALPINE_VERSION: '3.16' + POSTGRES_VERSION: '17' environment: - SCHEDULE: '@weekly' # optional - BACKUP_KEEP_DAYS: 7 # optional - PASSPHRASE: passphrase # optional + SCHEDULE: '@weekly' # optional + BACKUP_KEEP_DAYS: 7 # optional + PASSPHRASE: passphrase # optional S3_REGION: S3_ACCESS_KEY_ID: S3_SECRET_ACCESS_KEY: