From 6c7c0eb7e79860cfbe47ca9f1f99270b9e91c2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Mart=C3=ADn?= Date: Tue, 12 Feb 2019 15:02:59 +0100 Subject: [PATCH] making nodejs version dynamic and LTS as default --- ...Dockerfile-nodejs-xenial-pg101:postgis-2.4.4.6} | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename docker/{Dockerfile-nodejs10-xenial-pg101:postgis-2.4.4.6 => Dockerfile-nodejs-xenial-pg101:postgis-2.4.4.6} (97%) diff --git a/docker/Dockerfile-nodejs10-xenial-pg101:postgis-2.4.4.6 b/docker/Dockerfile-nodejs-xenial-pg101:postgis-2.4.4.6 similarity index 97% rename from docker/Dockerfile-nodejs10-xenial-pg101:postgis-2.4.4.6 rename to docker/Dockerfile-nodejs-xenial-pg101:postgis-2.4.4.6 index 0d2e6279..87761ffe 100644 --- a/docker/Dockerfile-nodejs10-xenial-pg101:postgis-2.4.4.6 +++ b/docker/Dockerfile-nodejs-xenial-pg101:postgis-2.4.4.6 @@ -6,7 +6,7 @@ ENV NPROCS 1 ENV JOBS 1 ENV CXX g++-4.9 ENV PGUSER postgres -ENV NODEJS_VERSION 10.15.1 +ENV NODEJS_VERSION --lts # Add external repos RUN set -ex \ @@ -19,6 +19,7 @@ RUN set -ex \ && add-apt-repository -y ppa:cartodb/postgresql-10 \ && add-apt-repository -y ppa:cartodb/gis \ && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash \ + && . ~/.nvm/nvm.sh \ && locale-gen en_US.UTF-8 \ && update-locale LANG=en_US.UTF-8 @@ -83,14 +84,11 @@ RUN set -ex \ && psql -c "CREATE EXTENSION postgis" template_postgis \ && /etc/init.d/postgresql stop -RUN set -ex \ - && . ~/.nvm/nvm.sh \ +WORKDIR /srv +EXPOSE 5858 + +CMD /etc/init.d/postgresql start \ && nvm install $NODEJS_VERSION \ && nvm alias default $NODEJS_VERSION \ && nvm use default - -WORKDIR /srv -EXPOSE 5858 - -CMD /etc/init.d/postgresql start