Skip to content

add 12-alpine #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions 12-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG postgres_version=12

# extension builder
FROM postgres:${postgres_version}-alpine AS extension_builder

RUN cd / && mkdir external_extensions && mkdir /external_extensions/sequential-uuids
COPY lib/sequential-uuids/ /external_extensions/sequential-uuids/
WORKDIR /external_extensions/sequential-uuids/

RUN apk update && apk add build-base icu-dev postgresql-dev
RUN make clean && make install
# run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage

# main image
FROM postgres:${postgres_version}-alpine

LABEL maintainer="[email protected]"

COPY --from=extension_builder /usr/local/lib/postgresql/bitcode /usr/local/lib/postgresql/bitcode
COPY --from=extension_builder /usr/local/share/postgresql/extension /usr/local/share/postgresql/extension

# ref: https://github.com/docker-library/postgres/issues/340

# after in sql:
# CREATE EXTENSION sequential_uuids;