forked from ckan/ckan-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.dev
80 lines (63 loc) · 3.01 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM ckan/ckan-dev:2.10.7
# 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)
### 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 pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat && \
# pip3 install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt
# Install any extensions needed by your CKAN instance
COPY setup/dbca_requirements.sh ${APP_DIR}
RUN pip3 install pip --upgrade && \
chmod +x ${APP_DIR}/dbca_requirements.sh && \
${APP_DIR}/dbca_requirements.sh
# 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
## DBCA specific configuration ##
# ckanext-saml2auth dependencies
RUN apk add xmlsec-dev
COPY saml ${APP_DIR}/saml
# Override the default dbca_start_ckan_development.sh script
COPY setup/dbca_start_ckan_development.sh.override ${APP_DIR}/start_ckan_development.sh
RUN chmod +x ${APP_DIR}/start_ckan_development.sh
# Copy config files
COPY config/*.ini ${APP_DIR}/config/
# Override default CKAN config file to use dbca.ini
ENV CKAN_INI=${APP_DIR}/config/dbca.ini
# Set the permissions to the ckan user
RUN chown -R ckan:ckan $APP_DIR && \
chown -R ckan:ckan /usr/lib/python3.10/site-packages/ && \
chown -R ckan:ckan /usr/bin/
# Set the default user to ckan
USER ckan