I am using the mundialis/grass-py3-pdal:8.2.0-alpine
docker image to run GRASS. I run the following from the bash command line (inside the container):
/usr/local/grass/bin/v.in.ogr input=/path/to/nonexistent/folder/and/file.shp output=/another/nonexistent/path
... and I get back no output. The script just runs and finishes. No complaint. Nothing.
So I try it in verbose mode, with an existing output folder:
/usr/local/grass/bin/v.in.ogr --verbose input=/path/to/nonexistent/folder/and/file.shp output=/output
Still no complaint. Needless to say, there's also nothing in the output folder.
What's going on here? Is there a way I can get the script to give me more information? As I've never used this script, I'm sort of hoping to have some google-able error messages if possible.
====
EDIT #1: I verified that when I do ls /usr/local/grass/bin/v.in.ogr
from inside the container, I get a listing of the script, which is shown in a nice, executable green font. So the script seems to be running. It's just being very, very quiet when things go wrong.
====
EDIT #2: I also verified with a touch
that I have the rights to write to the output folder. So it's not that.
====
EDIT #3: I simplified the situation above somewhat to make the question easier to answer. The full command for running the script with a real file is docker-compose run --rm grass-service /usr/local/grass/bin/v.in.ogr --verbose input=/input/kx-amtrak-stations-SHP/amtrak-stations.shp output=/output/grass_map
. This is also failing silently, though I get a status of 0 rather than a status of 1. The output
folder is set to rw
in my docker-compose.yml
file, which looks like this:
version: '3'
services:
grass-service:
image: mundialis/grass-py3-pdal:8.2.0-alpine
volumes:
- ./output:/output:rw # This will be the persistent store
- ./src:/src:rw # Contains code to run analysis
- ./input:/input # Contains some .tif images to import
environment:
- STAGE=dev
- GISDBASE=/data/grassdata
- LOCATION=2193
- MAPSET=project
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
- ADDITIONAL_PATH=/usr/local/grass/bin
network_mode: host
stdin_open: true
tty: true
... and the Dockerfile looks like this:
FROM mundialis/grass-py3-pdal:8.2.0-alpine
RUN export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/grass/bin
RUN chmod +x /src/fulltask.sh
RUN chmod +w /output
ogrinfo -so /path/to.shp
to check the data from inside the container.--verbose
tag applied