Skip to content

cleanup & add 13-alpine #3

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
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion 12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ WORKDIR /external_extensions/sequential-uuids/

RUN apt-get update && apt install build-essential libicu-dev postgresql-server-dev-all -y --no-install-recommends
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}
Expand All @@ -17,7 +18,6 @@ ARG pg_version_in_path=12

LABEL maintainer="[email protected]"

# run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
COPY --from=extension_builder /usr/lib/postgresql/${pg_version_in_path}/lib /usr/lib/postgresql/${pg_version_in_path}/lib
COPY --from=extension_builder /usr/share/postgresql/${pg_version_in_path}/extension /usr/share/postgresql/${pg_version_in_path}/extension

Expand Down
25 changes: 25 additions & 0 deletions 13-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG postgres_version=13

# 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;
2 changes: 1 addition & 1 deletion 13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ WORKDIR /external_extensions/sequential-uuids/

RUN apt-get update && apt install build-essential libicu-dev postgresql-server-dev-all -y --no-install-recommends
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}
Expand All @@ -17,7 +18,6 @@ ARG pg_version_in_path=13

LABEL maintainer="[email protected]"

# run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
COPY --from=extension_builder /usr/lib/postgresql/${pg_version_in_path}/lib /usr/lib/postgresql/${pg_version_in_path}/lib
COPY --from=extension_builder /usr/share/postgresql/${pg_version_in_path}/extension /usr/share/postgresql/${pg_version_in_path}/extension

Expand Down