summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2021-01-18 14:30:18 -0500
committerAdam Kocoloski <kocolosk@apache.org>2021-01-18 14:30:18 -0500
commit6f753af236e97a70b0fc7723628a2fe61ac8e519 (patch)
tree05888b139b4c092be3a546a603060e79170beb4d
parent7974dad0ce28ddd6b78b6648869a03411cc19e6a (diff)
downloadcouchdb-3.x-devcontainer.tar.gz
Allow setting SM_VSN in environment, and use that in Dockerfile3.x-devcontainer
This enables the container environment to automatically default to SpiderMonkey 60, which is the version we want to use for the Debian Buster OS on which the container image is based.
-rw-r--r--.devcontainer/Dockerfile6
-rwxr-xr-xconfigure2
2 files changed, 5 insertions, 3 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 6394908e3..04a117cb2 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,17 +1,19 @@
ARG ELIXIR_VERSION
FROM elixir:${ELIXIR_VERSION}
+# Install SpiderMonkey 60 and tell CouchDB to use it in configure
+ENV SM_VSN=60
+
# Use NodeSource binaries for Node.js (Fauxton dependency)
RUN set -ex; \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -; \
echo "deb https://deb.nodesource.com/node_10.x buster main" | tee /etc/apt/sources.list.d/nodesource.list; \
echo "deb-src https://deb.nodesource.com/node_10.x buster main" | tee -a /etc/apt/sources.list.d/nodesource.list
-# Using SM 60 here so be sure to set --spidermonkey-version 60 in configure
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
- libmozjs-60-dev \
+ libmozjs-${SM_VSN}-dev \
libicu-dev \
python3-venv \
python3-pip \
diff --git a/configure b/configure
index a341259dc..b902fe2b6 100755
--- a/configure
+++ b/configure
@@ -29,7 +29,7 @@ ERLANG_MD5="false"
SKIP_DEPS=0
COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)"
-SM_VSN="1.8.5"
+SM_VSN=${SM_VSN:-"1.8.5"}
ARCH="$(uname -m)"
. ${rootdir}/version.mk