-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Is there any existing Docker container? If not, I have made a basic Dockerfile that seems to work:
FROM postgres:18-trixie
ENV POSTGRES_VERSION 18
# ca certs is needed to resolve github cloning issue
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
git \
build-essential \
postgresql-server-dev-$POSTGRES_VERSION \
&& rm -rf /var/lib/apt/lists/*
ENV ORA_MIGRATOR_TAG RELEASE_1_0_0
RUN export PG_PATH=$(pg_config --sharedir) && \
echo "Going to $PG_PATH" && \
cd "$PG_PATH" && \
cd extension && \
git clone --depth 1 --branch $ORA_MIGRATOR_TAG https://github.com/cybertec-postgresql/ora_migrator
RUN export PG_PATH=$(pg_config --sharedir) && \
cd "$PG_PATH" && \
cd extension && \
cd ora_migrator && \
make installYou can then use it with a docker-compose like this (mostly taken from the official postgres docker image docs):
# Use user: postgres; pw: set by yourself user/password credentials
services:
db:
image: postgres:18-ora_migrator
## Attention: run with --build flag to rebuild!
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
# set shared memory limit when using docker compose
shm_size: 128mb
# or set shared memory limit when deploy via swarm stack
#volumes:
# - type: tmpfs
# target: /dev/shm
# tmpfs:
# size: 134217728 # 128*2^20 bytes = 128Mb
ports:
- "5432:5432" # to be able to access via external tools
environment:
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
adminer:
image: adminer
restart: unless-stopped
ports:
- "8080:8080"Metadata
Metadata
Assignees
Labels
No labels