Commit 6b0daeb 1 parent 66fe910 commit 6b0daeb Copy full SHA for 6b0daeb
File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 1
- # Use the latest Postgres Docker image based on Alpine
2
1
FROM postgres:16-alpine
3
2
4
- # Set working directory
5
- WORKDIR /usr/src/app
3
+ RUN apk update && apk add git build-base postgresql-dev
4
+ RUN postgres --version
5
+ RUN git clone https://github.com/fboulnois/pg_uuidv7
6
+ RUN cd pg_uuidv7 && make && make install && ls -la
6
7
7
- # Install curl
8
- RUN apk add --no-cache curl
8
+ COPY ./init.sql /docker-entrypoint-initdb.d/init.sql
9
9
10
- RUN cd "$(mktemp -d)" \
11
- && curl -LO "https://github.com/fboulnois/pg_uuidv7/releases/download/v1.3.0/{pg_uuidv7.tar.gz,SHA256SUMS}" \
12
- && tar xf pg_uuidv7.tar.gz \
13
- && sha256sum -c SHA256SUMS \
14
- && PG_MAJOR=$(pg_config --version | sed 's/^.* \( [0-9]\{ 1,\}\) .*$/\1 /' ) \
15
- && cp "$PG_MAJOR/pg_uuidv7.so" "$(pg_config --pkglibdir)" \
16
- && cp sql/pg_uuidv7--1.3.sql pg_uuidv7.control "$(pg_config --sharedir)/extension"
17
10
# Add a script to run the CREATE EXTENSION command
18
11
RUN printf '#!/bin/sh\n psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_uuidv7;"' > /docker-entrypoint-initdb.d/init.sh
19
12
You can’t perform that action at this time.
0 commit comments