Open hvwaldow opened 5 years ago
Postgis was removed. I agree, it's a good idea to add a easy way to add this when required.
@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
We need PostGIS for ckanext-spatial. Also: replaced deprecated option
links
withdepends_on
indocker-compose[.dev].yml