Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-rieznik committed Aug 27, 2024
1 parent f3f87b7 commit 8213802
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
# 🐳 python-gdal
![Build](https://img.shields.io/github/actions/workflow/status/andrii-reznik/docker-python-gdal/push.yml?branch=master)![Pulls](https://img.shields.io/docker/pulls/andrejreznik/python-gdal.svg)![Size](https://img.shields.io/docker/image-size/andrejreznik/python-gdal/latest.svg)
#### Python + GDAL/OGR Docker image
# 🌍 python-gdal

Get and compile the latest stable GDAL/OGR sources from official repository.
![Build](https://img.shields.io/github/actions/workflow/status/andrii-rieznik/docker-python-gdal/push.yml?branch=master)![Pulls](https://img.shields.io/docker/pulls/andrejreznik/python-gdal)![Size](https://img.shields.io/docker/image-size/andrejreznik/python-gdal)

#### Usage
## Python GDAL/OGR API

Dockerfile provide defaults when executing a container:
These containers ship with pre-installed GDAL's and OGR's Python bindings.

```bash
$ docker run andrejreznik/python-gdal:stable
```
Powered by [`pyenv`](https://github.com/pyenv/pyenv) which helps to manage Python versions, and builded from official [`GDAL`](https://github.com/OSGeo/GDAL) sources.
## Usage

The `Dockerfile` provides defaults when executing a container:

Will output Python, pip and GDAL versions:
```bash
# prints Python, pip, and GDAL versions

```console
Python 3.12.4
pip 24.1.1 from /usr/local/pyenv/versions/3.12.4/lib/python3.12/site-packages/pip (python 3.12)
GDAL 3.9.1, released 2024/06/22
docker run ghcr.io/andrii-rieznik/python-gdal
```

Run container and start an interactive bash session as root
To run a container and start an interactive bash session as root:

```bash
$ docker run -it andrejreznik/python-gdal:stable bash
docker run -it ghcr.io/andrii-rieznik/python-gdal /bin/bash
```

#### Tags and versions
## Tags and versioning

You can also use a specific version of Python or GDAL by appropriate tag
To use a specific version of Python or GDAL with the appropriate tag:

```bash
$ docker run andrejreznik/python-gdal:py3.7.3-gdal3.0.0
docker run ghcr.io/andrii-rieznik/python-gdal:py3.12.4-gdal3.9.1
```

or build your own image with passed build args
To pass as build arguments:

```bash
$ make image GDAL_VERSION=3.8.4 PYTHON_VERSION=3.11
make image PYTHON_VERSION=3.12.4 GDAL_VERSION=3.9.1
```

## License

See [MIT](https://github.com/andrii-rieznik/docker-python-gdal/blob/master/LICENSE).

0 comments on commit 8213802

Please sign in to comment.