Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Run pg_embedding locally with docker compose #27

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SirlyDreamer
Copy link

Add Dockerfile with multi-stage build.
Add docker-compose.yaml to run pg_embedding easily.


WORKDIR /workspace

RUN git clone https://github.com/neondatabase/pg_embedding.git \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better solution is probably to ADD tar file, not a hole repo. It's possible to change refs if needed. But I am not 100% sure.

ADD https://github.com/neondatabase/pg_embedding/archive/refs/heads/main.tar.gz main.tar.gz
RUN tar --strip-components=1 -xvf main.tar.gz

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

RUN apt-get update \
&& apt-get install build-essential postgresql-server-dev-$PG_MAJOR_VER -y

ADD https://github.com/neondatabase/pg_embedding/archive/refs/heads/main.tar.gz main.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to copy from local disc?

  1. to run this docker file you need to clone the sources. I guess, that you’ll have it
  2. It will allow you to build images on different branches/tags without changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants