Skip to content

Commit a7005d0

Browse files
authored
Merge pull request #3 from yuuuxt/dev
cleanup & add 13-alpine
2 parents f69bb21 + 99a1162 commit a7005d0

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

12/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ WORKDIR /external_extensions/sequential-uuids/
99

1010
RUN apt-get update && apt install build-essential libicu-dev postgresql-server-dev-all -y --no-install-recommends
1111
RUN make clean && make install
12+
# run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
1213

1314
# main image
1415
FROM postgres:${postgres_version}
@@ -17,7 +18,6 @@ ARG pg_version_in_path=12
1718

1819
LABEL maintainer="[email protected]"
1920

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

13-alpine/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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;

13/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ WORKDIR /external_extensions/sequential-uuids/
99

1010
RUN apt-get update && apt install build-essential libicu-dev postgresql-server-dev-all -y --no-install-recommends
1111
RUN make clean && make install
12+
# run find / -name 'sequential_uuids*' to find newly compiled files and copy to next stage
1213

1314
# main image
1415
FROM postgres:${postgres_version}
@@ -17,7 +18,6 @@ ARG pg_version_in_path=13
1718

1819
LABEL maintainer="[email protected]"
1920

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

0 commit comments

Comments
 (0)