Support for plv8 1.5.x
ruimarinho opened this issue · 2 comments
ruimarinho commented
plv8 1.5.x requires a newer version of V8 (4.3.66) which hasn't been made compatible with the libv8-dev
Debian package yet. The last version available is 3.14.5, launched more than 3 years ago. Statically linking V8 by compiling with make static
might be the only option going forward, but it requires about 3gb to build. The image would have to be slimmed down after compiling.
Potential diff:
diff --git c/9.5-1.5/Dockerfile i/9.5-1.5/Dockerfile
new file mode 100644
index 0000000..2632a2b
--- /dev/null
+++ i/9.5-1.5/Dockerfile
@@ -0,0 +1,12 @@
+FROM postgres:9.5
+MAINTAINER Chia-liang Kao <clkao@clkao.org>
+
+RUN apt-get update \
+ && apt-get install -y build-essential libv8-dev git-core postgresql-server-dev-$PG_MAJOR \
+ && rm -rf /var/lib/apt/lists/*
+
+ENV PLV8_BRANCH master
+
+RUN cd /tmp && git clone -b $PLV8_BRANCH https://github.com/plv8/plv8.git \
+ && cd /tmp/plv8 \
+ && make static install
diff --git c/9.5-1.5/README i/9.5-1.5/README
new file mode 100644
index 0000000..34fa3ab
--- /dev/null
+++ i/9.5-1.5/README
@@ -0,0 +1,19 @@
+# postgres-plv8
+
+Docker image for running plv8 1.5.x on Postgres 9.5.
+
+Based on the [official Postgres image](http://registry.hub.docker.com/_/postgres/).
+
+## Usage
+
+Start a postgres server container with persistent storage and give it a name:
+
+```bash
+$ docker run -d -v /tmp/data:/var/lib/postgresql/data --name some-postgres clkao/postgres-plv8:9.5
+```
+
+Start client container that links to the server container above as the "postgres" alias:
+
+```
+$ docker run --link some-postgres:postgres --rm -ti clkao/postgres-plv8:9.5 bash -c 'psql -U postgres -h $POSTGRES_PORT_5432_TCP_ADDR'
+```
clkao commented
In this case I think we also need to build the tag 9.5-1.5 and 9.4-1.5? Or is there a better way to encode the two version numbers?
ruimarinho commented
I think 9.4-1.5 sounds fine and the docker image can be kept updated with the latest 1.5.x HEAD commit until a proper tag is pushed there.