[GRASS-SVN] r73293 - in grass/branches/releasebranch_7_4: . lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 7 23:47:57 PDT 2018


Author: neteler
Date: 2018-09-07 23:47:57 -0700 (Fri, 07 Sep 2018)
New Revision: 73293

Modified:
   grass/branches/releasebranch_7_4/Dockerfile
   grass/branches/releasebranch_7_4/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_4/Dockerfile
===================================================================
--- grass/branches/releasebranch_7_4/Dockerfile	2018-09-08 06:47:36 UTC (rev 73292)
+++ grass/branches/releasebranch_7_4/Dockerfile	2018-09-08 06:47:57 UTC (rev 73293)
@@ -107,6 +107,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_4/lib/init/grass.py
===================================================================
--- grass/branches/releasebranch_7_4/lib/init/grass.py	2018-09-08 06:47:36 UTC (rev 73292)
+++ grass/branches/releasebranch_7_4/lib/init/grass.py	2018-09-08 06:47:57 UTC (rev 73293)
@@ -1315,7 +1315,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