{"id":18907961,"url":"https://github.com/perrygeo/docker-gdal-base","last_synced_at":"2025-09-16T12:22:47.514Z","repository":{"id":45584314,"uuid":"162343024","full_name":"perrygeo/docker-gdal-base","owner":"perrygeo","description":"A base docker image for geospatial applications","archived":false,"fork":false,"pushed_at":"2022-12-23T23:19:46.000Z","size":29,"stargazers_count":59,"open_issues_count":1,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T17:38:44.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perrygeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-18T20:42:01.000Z","updated_at":"2024-10-15T13:46:20.000Z","dependencies_parsed_at":"2023-01-30T19:46:03.198Z","dependency_job_id":null,"html_url":"https://github.com/perrygeo/docker-gdal-base","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrygeo%2Fdocker-gdal-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrygeo%2Fdocker-gdal-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrygeo%2Fdocker-gdal-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrygeo%2Fdocker-gdal-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perrygeo","download_url":"https://codeload.github.com/perrygeo/docker-gdal-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239895448,"owners_count":19714828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T09:24:02.639Z","updated_at":"2025-09-16T12:22:42.448Z","avatar_url":"https://github.com/perrygeo.png","language":"Dockerfile","funding_links":[],"categories":["GDAL of course"],"sub_categories":["Testing your code"],"readme":"# Docker images for geospatial applications\n\n[![Build Status](https://travis-ci.com/perrygeo/docker-gdal-base.svg?branch=master)](https://travis-ci.com/perrygeo/docker-gdal-base)\n\n`docker-gdal-base` is a continuous integration system that\n\n- builds a reliable base image for production geospatial applications in the **GDAL** family.\n- relies on the official `debian` images and direct descendants like `python`.\n- is built and distributed with the computing resources provided by github, travis-ci and dockerhub.\n- uses only free and open source software.\n- are up-to-date with recent versions of core libraries, built from source code for full control.\n- is optimized for (but not obsessed with) runtime speed and small image size.\n- has a reasonably full set of configuration options and drivers.\n- is tested regularly, both with an automated test suite and in production systems.\n- remain freely available.\n- for this base image,\n  - leverage caching by using separate `RUN` steps.\n  - provide common shared libraries, a full C/C++ build environment, and Python 3.6.\n  - install all compiled binaries and libs to `/usr/local`.\n- for subsequent production images that inherit from it\n  - use multistage builds to minimize the final image size; you don't need carry around the entire build environment in production.\n\nSee [`perrygeo/gdal-base` on Dockerhub](https://hub.docker.com/r/perrygeo/gdal-base)\n\n## Packages and version numbers\n\nDockerfiles are based on [`python:3.8-slim-buster`](https://github.com/docker-library/python/blob/master/3.8/buster/slim/Dockerfile) which in turn is based on Debian 10/Buster.\n\nThe following versions built from source:\n\n```\nWEBP_VERSION 1.0.0\nZSTD_VERSION 1.3.4\nGEOS_VERSION 3.9.1\nLIBTIFF_VERSION 4.1.0\nCURL_VERSION 7.73.1\nPROJ_VERSION 7.2.1\nOPENJPEG_VERSION 2.3.1\nGDAL_VERSION 3.2.1\nSQLITE_VERSION 3330000\n```\n\n## GDAL Drivers\n\n- `GTiff` GeoTIFF with WEBP, ZSTD compression options.\n- `JP2OpenJPEG` JPEG-2000 driver based on OpenJPEG library\n- see `gdalinfo --formats` for the full list\n\n## Using the image directly\n\nTo run the GDAL command line utilities on local files, on data in the current working directory:\n\n```bash\ndocker run --rm -it \\\n    --volume $(shell pwd)/:/data \\\n    perrygeo/gdal-base:latest \\\n    gdalinfo /data/your.tif\n```\n\nYou can set it as an alias to save typing\n\n```bash\nfunction with-gdal-base {\n    docker run --rm -it --volume $(pwd)/:/data perrygeo/gdal-base:latest \"$@\"\n}\n\nwith-gdal-base gdalinfo /data/your.tif\n```\n\n## Using the Makefile\n\n- `make` builds the image\n- `make test` tests the image\n- `make shell` gets you into a bash shell with the current working directory mounted at `/app`\n\n## Extending the image\n\nUse a multistage build to pull your binaries and shared library objects in `/usr/local` onto a fresh image.\n\nExample:\n\n```Dockerfile\nFROM perrygeo/gdal-base:latest as builder\n\n# Python dependencies that require compilation\nCOPY requirements.txt .\nRUN python -m pip install cython numpy -c requirements.txt\nRUN python -m pip install --no-binary fiona,rasterio,shapely -r requirements.txt\nRUN pip uninstall cython --yes\n\n# ------ Second stage\n# Start from a clean image\nFROM python:3.8-slim-buster as final\n\n# Install some required runtime libraries from apt\nRUN apt-get update \\\n    \u0026\u0026 apt-get install --yes --no-install-recommends \\\n        libfreexl1 libxml2 \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Install the previously-built shared libaries from the builder image\nCOPY --from=builder /usr/local /usr/local\nRUN ldconfig\n```\n\n## License\n\nDocker image licensing [is a mess](https://opensource.stackexchange.com/a/7015).\nIn lieu of clear best practices, I'm making the source code and the associated images on dockerhub\navailable as **public domain**.\n\nThere is no warranty of any kind.\nYou're on your own if you choose to use any of these resources.\nIf the images work for you, great!\nPlease `docker pull` it, fork it, `git clone` it, download it, whatever.\nThanks to github, travis-ci and dockerhub\nfor donating the computing resources to support open source projects such as this.\n\n## Contributing\n\nIdeas for additional drivers or software? Bug fixes? Please create a pull request on this repo with:\n\n- a description.\n- code + an automated test for the new functionality.\n- results of trying it in production.\n\nIf your proposal is aligned with the project's goals, I'll gladly consider it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrygeo%2Fdocker-gdal-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperrygeo%2Fdocker-gdal-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrygeo%2Fdocker-gdal-base/lists"}