File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ WORKDIR /external_extensions/sequential-uuids/
9
9
10
10
RUN apt-get update && apt install build-essential libicu-dev postgresql-server-dev-all -y --no-install-recommends
11
11
RUN make clean && make install
12
+ # run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
12
13
13
14
# main image
14
15
FROM postgres:${postgres_version}
@@ -17,7 +18,6 @@ ARG pg_version_in_path=12
17
18
18
19
LABEL maintainer=
"[email protected] "
19
20
20
- # run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
21
21
COPY --from=extension_builder /usr/lib/postgresql/${pg_version_in_path}/lib /usr/lib/postgresql/${pg_version_in_path}/lib
22
22
COPY --from=extension_builder /usr/share/postgresql/${pg_version_in_path}/extension /usr/share/postgresql/${pg_version_in_path}/extension
23
23
Original file line number Diff line number Diff line change
1
+ ARG postgres_version=13
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;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ WORKDIR /external_extensions/sequential-uuids/
9
9
10
10
RUN apt-get update && apt install build-essential libicu-dev postgresql-server-dev-all -y --no-install-recommends
11
11
RUN make clean && make install
12
+ # run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
12
13
13
14
# main image
14
15
FROM postgres:${postgres_version}
@@ -17,7 +18,6 @@ ARG pg_version_in_path=13
17
18
18
19
LABEL maintainer=
"[email protected] "
19
20
20
- # run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
21
21
COPY --from=extension_builder /usr/lib/postgresql/${pg_version_in_path}/lib /usr/lib/postgresql/${pg_version_in_path}/lib
22
22
COPY --from=extension_builder /usr/share/postgresql/${pg_version_in_path}/extension /usr/share/postgresql/${pg_version_in_path}/extension
23
23
You can’t perform that action at this time.
0 commit comments