Providing postgis
image for linux/amd64 and linux/arm64, based on the code copied from postgis/docker-postgis
.
Official postgis/postgis
image only provides image for linux/amd64, so when using postgis, docker compose up --build
on linux/arm64 fails. Postgis does not provide linux/arm64 image until now, even though the issue reported in Dec. 2020.
Copying Dockerfile
and building image locally will solve this issue, but every new release of postgis will delete previous version and fails RUN apt-get update
in Dockerfile.
Creating and publishing a Docker image using Github packages allows us to handle this and provide a fixed-version postgis package.
Postgres 13-bullseye
Postgis 3.2.3
Source code of this image was taken from postgis/docker-postgis
, Copyright 2014 Original Authors. This package is licensed under the MIT license. See docker-postgis/LICENSE for details.
After following the Quickstart with Docker guide, add postgis
to services like below.
version: '3.7'
services:
postgres:
image: ghcr.io/wasd-inc/postgis
environment:
POSTGRES_USER: ...
POSTGRES_PASSWORD: ...
POSTGRES_DB: ...
volumes:
- db-data:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck: ...
volumes:
db_data: