Skip to content

Instantly share code, notes, and snippets.

@blacha
Created November 6, 2021 22:26
Show Gist options
  • Select an option

  • Save blacha/286b3f75445c089d19adc921ab573ae9 to your computer and use it in GitHub Desktop.

Select an option

Save blacha/286b3f75445c089d19adc921ab573ae9 to your computer and use it in GitHub Desktop.
Run GDAL in $PWD from docker
#!/bin/bash
CUID=$(id -u)
CGID=$(id -g)
# Run docker as the current user in the current diretory
docker run \
--user $CUID:$CGID \
--volume $PWD:$PWD \
--workdir $PWD \
--rm \
osgeo/gdal:ubuntu-small-latest "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment