98 lines
3.6 KiB
Docker
98 lines
3.6 KiB
Docker
FROM ckan/ckan-dev:2.10.4
|
|
|
|
RUN pip install --upgrade pip
|
|
ENV PROJ_DIR=/usr
|
|
RUN apk add proj proj-dev
|
|
RUN apk add proj-util
|
|
|
|
|
|
# Install any extensions needed by your CKAN instance
|
|
# - Make sure to add the plugins to CKAN__PLUGINS in the .env file
|
|
# - Also make sure all provide all extra configuration options, either by:
|
|
# * Adding them to the .env file (check the ckanext-envvars syntax for env vars), or
|
|
# * Adding extra configuration scripts to /docker-entrypoint.d folder) to update
|
|
# the CKAN config file (ckan.ini) with the `ckan config-tool` command
|
|
#
|
|
# See README > Extending the base images for more details
|
|
#
|
|
# For instance:
|
|
#
|
|
### XLoader ###
|
|
#RUN pip3 install -e 'git+https://github.com/ckan/ckanext-xloader.git@master#egg=ckanext-xloader' && \
|
|
# pip3 install -r ${APP_DIR}/src/ckanext-xloader/requirements.txt && \
|
|
# pip3 install -U requests[security]
|
|
|
|
### Harvester ###
|
|
#RUN pip3 install -e 'git+https://github.com/ckan/ckanext-harvest.git@master#egg=ckanext-harvest' && \
|
|
# pip3 install -r ${APP_DIR}/src/ckanext-harvest/pip-requirements.txt
|
|
# will also require gather_consumer and fetch_consumer processes running (please see https://github.com/ckan/ckanext-harvest)
|
|
RUN pip install -e git+https://github.com/ckan/ckanext-harvest.git@v1.5.6#egg=ckanext-harvest \
|
|
pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/v1.5.6/requirements.txt
|
|
|
|
### Scheming ###
|
|
#RUN pip3 install -e 'git+https://github.com/ckan/ckanext-scheming.git@master#egg=ckanext-scheming'
|
|
|
|
### Pages ###
|
|
#RUN pip3 install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages
|
|
|
|
### DCAT ###
|
|
RUN pip install -e git+https://github.com/ckan/ckanext-dcat.git@v1.6.0#egg=ckanext-dcat && \
|
|
pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v1.6.0/requirements.txt
|
|
|
|
|
|
### SPATIAL ###
|
|
RUN pip install pyproj==3.6.1
|
|
RUN pip install geos
|
|
RUN apk add py3-pip
|
|
RUN pip install pymap3d
|
|
RUN apk --update add build-base libxslt-dev
|
|
|
|
RUN apk add --virtual .build-deps \
|
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
|
--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 $runDeps
|
|
|
|
RUN geos-config --cflags
|
|
|
|
#RUN pip install --disable-pip-version-check shapely
|
|
|
|
#RUN apk del build-base python3-dev && \
|
|
# rm -rf /var/cache/apk/*
|
|
RUN apk add --no-cache python3-dev libstdc++ && \
|
|
apk add --no-cache g++ && \
|
|
ln -s /usr/include/locale.h /usr/include/xlocale.h && \
|
|
pip3 install numpy && \
|
|
pip3 install pandas
|
|
|
|
RUN pip install shapely
|
|
|
|
RUN pip install -e git+https://github.com/ckan/ckanext-spatial.git@v2.1.1#egg=ckanext-spatial
|
|
RUN pip install -r https://raw.githubusercontent.com/ckan/ckanext-spatial/v2.1.1/requirements.txt
|
|
|
|
RUN pip install WebHelpers2 \
|
|
pip install xmltodict \
|
|
pip install pyqrcode
|
|
|
|
# Clone the extension(s) your are writing for your own project in the `src` folder
|
|
# to get them mounted in this image at runtime
|
|
|
|
# Copy custom initialization scripts
|
|
COPY docker-entrypoint.d/* /docker-entrypoint.d/
|
|
|
|
# Apply any patches needed to CKAN core or any of the built extensions (not the
|
|
# runtime mounted ones)
|
|
COPY patches ${APP_DIR}/patches
|
|
|
|
RUN for d in $APP_DIR/patches/*; do \
|
|
if [ -d $d ]; then \
|
|
for f in `ls $d/*.patch | sort -g`; do \
|
|
cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \
|
|
done ; \
|
|
fi ; \
|
|
done
|