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

Allow to optionally choose PostGIS enabled image #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hvwaldow
Copy link
Contributor

We need PostGIS for ckanext-spatial.
Also: replaced deprecated option linkswith depends_onin docker-compose[.dev].yml

@avdata99
Copy link
Member

Postgis was removed. I agree, it's a good idea to add a easy way to add this when required.

@reinvantveer
Copy link

@hvwaldow have you had good experiences with installing the spatial extension itself? I couldn't get shapely installed on the Alpine image. It keeps complaining that it can't find the geos libraries, even if I point the environment variable GEOS_CONFIG to /usr/bin/geos-config. Would be interested in the Docker recipe for that. Haven't found anything useful on stackoverflow.

I tried:

FROM openknowledge/ckan-dev:2.8

# Set timezone
ARG TZ
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime
RUN echo $TZ > /etc/timezone

RUN echo "http://mirror.leaseweb.com/alpine/edge/community" >> /etc/apk/repositories
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk add --virtual .build-deps \
        --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
        --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
        gcc libc-dev geos-dev geos && \
    runDeps="$(scanelf --needed --nobanner --recursive /usr/local \
    | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
    | xargs -r apk info --installed \
    | sort -u)" && \
    apk add --virtual .rundeps
RUN geos-config --cflags
RUN which geos-config
RUN GEOS_CONFIG=/usr/bin/geos-config pip install shapely

RUN pip install -e git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial && \
    pip install -r https://raw.githubusercontent.com/ckan/ckanext-spatial/master/pip-requirements.txt

ccancellieri pushed a commit to ccancellieri/docker-ckan that referenced this pull request Aug 31, 2023
Update README to include essential information from old docs
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

Successfully merging this pull request may close these issues.

3 participants