Skip to content

Instantly share code, notes, and snippets.

@maxcollombin
Created August 2, 2023 13:35
Show Gist options
  • Save maxcollombin/0d445b6e815a3841c98760bebef486d0 to your computer and use it in GitHub Desktop.
Save maxcollombin/0d445b6e815a3841c98760bebef486d0 to your computer and use it in GitHub Desktop.
Tutorial on using gdal with docker

Step 1: Install Docker

Step 2: Pull the GDAL Image

docker pull geodata/gdal:latest

Step 3: Prepare Data Volume

mkdir mydata && cd mydata

Step 4: Create a sample data file

touch point.geojson echo '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-123.19158554077147,44.851122784247245]}}]}' > point.geojson

Step 5: Run the container in interactive mode

docker run -it --rm -v /mnt/c/Users/maxime.collombi/'OneDrive - HESSO'/Bureau/mydata:/root/mydata/ geodata/gdal /bin/bash

Step 6: Access & Process the data in the container

cd /root/

Step 6: gdal operations

Step 7: Exit container

exit

Reference:

https://tannergeo.com/2017/10/05/Use-GDAL-With-Docker.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment