40 lines
1.0 KiB
Docker
40 lines
1.0 KiB
Docker
|
###################
|
||
|
### Extensions
|
||
|
###################
|
||
|
FROM registry.trust-itservices.com/d4science/ckan-docker/ckan:2.10.4-focal as extbuild
|
||
|
|
||
|
# Switch to the root user
|
||
|
USER root
|
||
|
|
||
|
#install pip
|
||
|
RUN apt-get update
|
||
|
RUN apt-get install python3-dev python3-pip libxml2-dev libxslt1-dev libgeos-c1v5 -y
|
||
|
|
||
|
############
|
||
|
### MAIN
|
||
|
############
|
||
|
FROM registry.trust-itservices.com/d4science/ckan-docker/ckan:2.10.4-focal
|
||
|
|
||
|
# Add the custom extensions to the plugins list
|
||
|
ENV CKAN__PLUGINS envvars image_view text_view recline_view datastore datapusher spatial_metadata spatial_query d4science d4science_theme
|
||
|
|
||
|
# Switch to the root user
|
||
|
USER root
|
||
|
|
||
|
#COPY --from=extbuild /wheels /srv/app/ext_wheels
|
||
|
|
||
|
# Add requirements.txt to the image
|
||
|
COPY requirements.txt /srv/app/requirements.txt
|
||
|
|
||
|
# Install and enable the custom extensions
|
||
|
RUN pip install -r /srv/app/requirements.txt
|
||
|
|
||
|
RUN ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
|
||
|
chown -R ckan:ckan /srv/app
|
||
|
|
||
|
# Remove wheels
|
||
|
RUN rm -rf /srv/app/ext_wheels
|
||
|
|
||
|
# Switch to the ckan user
|
||
|
# USER ckan
|