Commit a528966 1 parent a8c31e0 commit a528966 Copy full SHA for a528966
File tree 1 file changed +5
-25
lines changed
1 file changed +5
-25
lines changed Original file line number Diff line number Diff line change 1
- FROM postgres:16-alpine AS env-build
1
+ FROM postgres:16
2
2
3
- # install build dependencies
4
- RUN apk update && apk upgrade \
5
- && apk add build-base postgresql-dev
6
-
7
- WORKDIR /srv
8
- COPY . /srv
9
-
10
- # build extension for P16
11
- RUN pg_buildext build-16 16
12
-
13
- # create tarball and checksums
14
- RUN cp sql/pg_uuidv7--1.5.sql . && TARGETS=$(find * -name pg_uuidv7.so) \
15
- && tar -czvf pg_uuidv7.tar.gz $TARGETS pg_uuidv7--1.5.sql pg_uuidv7.control \
16
- && sha256sum pg_uuidv7.tar.gz $TARGETS pg_uuidv7--1.5.sql pg_uuidv7.control > SHA256SUMS
17
-
18
- FROM postgres:16-alpine AS env-deploy
19
-
20
- # copy tarball and checksums
21
- COPY --from=env-build /srv/pg_uuidv7.tar.gz /srv/SHA256SUMS /srv/
22
-
23
- # add extension to postgres
24
- COPY --from=env-build /srv/${PG_MAJOR}/pg_uuidv7.so /usr/lib/postgresql/${PG_MAJOR}/lib
25
- COPY --from=env-build /srv/pg_uuidv7.control /usr/share/postgresql/${PG_MAJOR}/extension
26
- COPY --from=env-build /srv/pg_uuidv7--1.5.sql /usr/share/postgresql/${PG_MAJOR}/extension
3
+ RUN apt-get update && apt-get -y install git build-essential postgresql-server-dev-16
4
+ RUN postgres --version
5
+ RUN git clone https://github.com/fboulnois/pg_uuidv7
6
+ RUN cd pg_uuidv7 && make && make install && ls -la
27
7
28
8
# Add a script to run the CREATE EXTENSION command
29
9
RUN printf '#!/bin/sh\n psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_uuidv7;"' > /docker-entrypoint-initdb.d/init.sh
You can’t perform that action at this time.
0 commit comments