[GRASS-SVN] r73291 - in grass/branches/releasebranch_7_6: . lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 7 23:40:44 PDT 2018
Author: neteler
Date: 2018-09-07 23:40:44 -0700 (Fri, 07 Sep 2018)
New Revision: 73291
Modified:
grass/branches/releasebranch_7_6/Dockerfile
grass/branches/releasebranch_7_6/lib/init/grass.py
Log:
Dockerfile: 'set ENV SHELL' to avoid /bin/sh fallback in interactive GRASS GIS sessions in docker
Modified: grass/branches/releasebranch_7_6/Dockerfile
===================================================================
--- grass/branches/releasebranch_7_6/Dockerfile 2018-09-08 06:35:52 UTC (rev 73290)
+++ grass/branches/releasebranch_7_6/Dockerfile 2018-09-08 06:40:44 UTC (rev 73291)
@@ -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/branches/releasebranch_7_6/lib/init/grass.py
===================================================================
--- grass/branches/releasebranch_7_6/lib/init/grass.py 2018-09-08 06:35:52 UTC (rev 73290)
+++ grass/branches/releasebranch_7_6/lib/init/grass.py 2018-09-08 06:40:44 UTC (rev 73291)
@@ -1430,7 +1430,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