postgresql-unit icon indicating copy to clipboard operation
postgresql-unit copied to clipboard

Added docker multistage build

Open datensalat opened this issue 6 years ago • 1 comments

Hey there, I added an easy docker approach for testing your extension.

datensalat avatar Jul 18 '19 10:07 datensalat

I'm currently using this Dockerfile

FROM postgres:12 AS extension_builder
RUN apt-get update -y
RUN apt-get install wget -y
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get install postgresql-12-unit -y

FROM postgres:12
COPY --from=extension_builder /usr/lib/postgresql/12/lib /usr/lib/postgresql/12/lib
COPY --from=extension_builder /usr/share/postgresql/12/extension /usr/share/postgresql/12/extension

based on the suggestion(s) here https://github.com/docker-library/postgres/issues/340#issuecomment-625724013

Just wondering if there are any glaring problems with this approach? Thanks!

johnrees avatar Jun 30 '20 10:06 johnrees