8000 Docker solution to plv8 #8 · suryatmodulus/postgres@d676a68 · GitHub
[go: up one dir, main page]

Skip to content

Commit d676a68

Browse files
committed
Docker solution to plv8 supabase#8
1 parent a5cdffb commit d676a68

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docker/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,42 @@ RUN git clone git://github.com/theory/pgtap.git \
2323
RUN apt-get update \
2424
&& apt-get install postgresql-plpython3-12 -y
2525

26+
# install plv8
27+
ENV PLV8_VERSION=2.3.13 \
28+
PLV8_SHASUM="1a96c559d98ad757e7494bf7301f0e6b0dd2eec6066ad76ed36cc13fec4f2390"
29+
30+
RUN buildDependencies="build-essential \
31+
ca-certificates \
32+
curl \
33+
git-core \
34+
python \
35+
gpp \
36+
cpp \
37+
pkg-config \
38+
apt-transport-https \
39+
cmake \
40+
libc++-dev \
41+
libc++abi-dev \
42+
postgresql-server-dev-$PG_MAJOR" \
43+
&& runtimeDependencies="libc++1 \
44+
libtinfo5 \
45+
libc++abi1" \
46+
&& apt-get update \
47+
&& apt-get install -y --no-install-recommends ${buildDependencies} ${runtimeDependencies} \
48+
&& mkdir -p /tmp/build \
49+
&& curl -o /tmp/build/v$PLV8_VERSION.tar.gz -SL "https://github.com/plv8/plv8/archive/v${PLV8_VERSION}.tar.gz" \
50+
&& cd /tmp/build \
51+
&& echo $PLV8_SHASUM v$PLV8_VERSION.tar.gz | sha256sum -c \
52+
&& tar -xzf /tmp/build/v$PLV8_VERSION.tar.gz -C /tmp/build/ \
53+
&& cd /tmp/build/plv8-$PLV8_VERSION \
54+
&& make static \
55+
&& make install \
56+
&& strip /usr/lib/postgresql/${PG_MAJOR}/lib/plv8-${PLV8_VERSION}.so \
57+
&& rm -rf /root/.vpython_cipd_cache /root/.vpython-root \
58+
&& apt-get clean \
59+
&& apt-get remove -y ${buildDependencies} \
60+
&& apt-get autoremove -y \
61+
&& rm -rf /tmp/build /var/lib/apt/lists/*
62+
2663
RUN mkdir -p /docker-entrypoint-initdb.d
2764
ADD ./mnt /docker-entrypoint-initdb.d/

0 commit comments

Comments
 (0)
0