Skip to content

Instantly share code, notes, and snippets.

@jsanz
Last active December 5, 2019 08:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsanz/8703e1d27f1f8514c388afb6f27d7b04 to your computer and use it in GitHub Desktop.
Save jsanz/8703e1d27f1f8514c388afb6f27d7b04 to your computer and use it in GitHub Desktop.
Docker wrapper for OGR commands

Simple wrappers around docker and OGR commands to expose ogr2ogr and ogrinfo using the latest builds. You need to be careful to always put absolute paths to your local data so the docker image can access it.

#!/bin/bash
docker run --rm --network=host -u $(id -u ${USER}):$(id -g ${USER}) \
-v /home:/home \
osgeo/gdal:alpine-small-latest \
ogr2ogr "$@"
#!/bin/bash
docker run --rm --network=host -u $(id -u ${USER}):$(id -g ${USER}) \
-v /home:/home \
osgeo/gdal:alpine-small-latest \
ogrinfo "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment