Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it with Python bindings? #3

Closed
qxang opened this issue Jan 26, 2018 · 3 comments
Closed

How to use it with Python bindings? #3

qxang opened this issue Jan 26, 2018 · 3 comments
Assignees

Comments

@qxang
Copy link

qxang commented Jan 26, 2018

Hi, it is great docker image, but can you provide one example for it with python bindings? Thank you.

@Joxit Joxit self-assigned this Jan 26, 2018
@Joxit
Copy link
Member

Joxit commented Feb 12, 2018

Hi,
This image does not include mapnik python binding.
But you can use jawg/mapnik3 as a base image for a python binding.

There are some informations in mapnik/python-mapnik branch v3.0.x repository for the installation.

@qxang
Copy link
Author

qxang commented Feb 12, 2018

I see. Thank you very much.

@qxang qxang closed this as completed Feb 12, 2018
@Sieboldianus
Copy link

Sieboldianus commented Jul 15, 2022

Had to do this. Here's how to follow @Joxit suggestion:

FROM jawg/mapnik3:3.1

ENV PYTHON_BINDINGS=" \
    autoconf \
    apache2-dev \
    libtool \
    libxml2-dev \ 
    libbz2-dev \
    libgeos-dev \ 
    libgeos++-dev \
    gdal-bin \
    python3 \
    python3-pip \
    python3-mapnik \ 
    python3-psycopg2 \
    python3-yaml"

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        $PYTHON_BINDINGS

Build the image:

docker build --tag mycontainers/mapnik3_python .

Then startup/run mapnik, e.g:

docker run --rm \
    --volume $(pwd)/data-test:/data-test \
    --volume ~/.fonts:/fonts \
    --volume $(pwd)/mapnik-docker-test:/mapnik-test \
    --volume $(pwd)/output:/output \
    docker.io/mycontainers/mapnik3_python \
    /bin/bash -c "python3 /mapnik-test/tagmap_xml.py"

I have added the Dockerfile here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants