-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathDockerfile
36 lines (33 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM postgres:11
MAINTAINER Chia-liang Kao <clkao@clkao.org>
ENV PLV8_VERSION=2.3.13 \
PLV8_SHASUM="1a96c559d98ad757e7494bf7301f0e6b0dd2eec6066ad76ed36cc13fec4f2390"
RUN buildDependencies="build-essential \
ca-certificates \
curl \
git-core \
python \
gpp \
cpp \
pkg-config \
apt-transport-https \
cmake \
libc++-dev \
postgresql-server-dev-$PG_MAJOR" \
runtimeDependencies="libc++1" \
&& apt-get update \
&& apt-get install -y --no-install-recommends ${buildDependencies} ${runtimeDependencies} \
&& mkdir -p /tmp/build \
&& curl -o /tmp/build/v$PLV8_VERSION.tar.gz -SL "https://github.com/plv8/plv8/archive/v${PLV8_VERSION}.tar.gz" \
&& cd /tmp/build \
&& echo $PLV8_SHASUM v$PLV8_VERSION.tar.gz | sha256sum -c \
&& tar -xzf /tmp/build/v$PLV8_VERSION.tar.gz -C /tmp/build/ \
&& cd /tmp/build/plv8-$PLV8_VERSION \
&& make static \
&& make install \
&& strip /usr/lib/postgresql/${PG_MAJOR}/lib/plv8-${PLV8_VERSION}.so \
&& rm -rf /root/.vpython_cipd_cache /root/.vpython-root \
&& apt-get clean \
&& apt-get remove -y ${buildDependencies} \
&& apt-get autoremove -y \
&& rm -rf /tmp/build /var/lib/apt/lists/*