File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ ARG postgres_version=12
2
+
3
+ # extension builder
4
+ FROM postgres:${postgres_version}-alpine AS extension_builder
5
+
6
+ RUN cd / && mkdir external_extensions && mkdir /external_extensions/sequential-uuids
7
+ COPY lib/sequential-uuids/ /external_extensions/sequential-uuids/
8
+ WORKDIR /external_extensions/sequential-uuids/
9
+
10
+ RUN apk update && apk add build-base icu-dev postgresql-dev
11
+ RUN make clean && make install
12
+ # run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
13
+
14
+ # main image
15
+ FROM postgres:${postgres_version}-alpine
16
+
17
+ LABEL maintainer=
"[email protected] "
18
+
19
+ COPY --from=extension_builder /usr/local/lib/postgresql/bitcode /usr/local/lib/postgresql/bitcode
20
+ COPY --from=extension_builder /usr/local/share/postgresql/extension /usr/local/share/postgresql/extension
21
+
22
+ # ref: https://github.com/docker-library/postgres/issues/340
23
+
24
+ # after in sql:
25
+ # CREATE EXTENSION sequential_uuids;
You can’t perform that action at this time.
0 commit comments