[GRASS-SVN] r73290 - in grass/trunk: . lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 7 23:35:52 PDT 2018
Author: neteler
Date: 2018-09-07 23:35:52 -0700 (Fri, 07 Sep 2018)
New Revision: 73290
Modified:
grass/trunk/Dockerfile
grass/trunk/lib/init/grass.py
Log:
Dockerfile: 'set ENV SHELL' to avoid /bin/sh fallback in interactive GRASS GIS sessions in docker
Modified: grass/trunk/Dockerfile
===================================================================
--- grass/trunk/Dockerfile 2018-09-07 22:41:49 UTC (rev 73289)
+++ grass/trunk/Dockerfile 2018-09-08 06:35:52 UTC (rev 73290)
@@ -84,6 +84,7 @@
ENV CXXFLAGS "$MYCXXFLAGS"
# Configure, compile and install GRASS GIS
+ENV NUMTHREADS=2
RUN ./configure \
--enable-largefile \
--with-cxx \
@@ -102,7 +103,7 @@
--with-geos=/usr/bin/geos-config \
--with-postgres --with-postgres-includes="/usr/include/postgresql" \
--with-opengl-libs=/usr/include/GL \
- && make -j2 && make install && ldconfig
+ && make -j $NUMTHREADS && make install && ldconfig
# enable simple grass command regardless of version number
RUN ln -s /usr/local/bin/grass* /usr/local/bin/grass
@@ -111,6 +112,9 @@
RUN apt-get autoremove -y
RUN apt-get clean -y
+# set SHELL var to avoid /bin/sh fallback in interactive GRASS GIS sessions in docker
+ENV SHELL /bin/bash
+
# Fix permissions
RUN chmod -R a+rwx $DATA_DIR
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2018-09-07 22:41:49 UTC (rev 73289)
+++ grass/trunk/lib/init/grass.py 2018-09-08 06:35:52 UTC (rev 73290)
@@ -1470,7 +1470,7 @@
os.environ['OSTYPE'] = "cygwin"
else:
# in docker the 'SHELL' variable may not be
- # visible in a Python session
+ # visible in a Python session unless 'ENV SHELL /bin/bash' is set in Dockerfile
try:
sh = os.path.basename(os.getenv('SHELL'))
except:
More information about the grass-commit
mailing list