forked from sufyanm/ckan-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (36 loc) · 1.23 KB
/
Dockerfile
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
FROM ubuntu:20.04
ENV CKAN_HOME /opt/ckan
ENV CKAN_INI $CKAN_HOME/ckan.ini
ENV LANG C.UTF-8
ENV TZ UTC
RUN set -ex; \
apt-get update; \
apt-get install -y curl git libpq-dev make python3-magic python3-pip sudo; \
mkdir -p $CKAN_HOME/src; \
addgroup --system --gid 92 ckan; \
adduser --system --home $CKAN_HOME --no-create-home --disabled-password --uid 92 --gid 92 ckan
WORKDIR $CKAN_HOME
RUN set -ex; \
pip install setuptools==44.1.0; \
pip install -e git+https://github.com/ckan/[email protected]#egg=ckan; \
pip install -r src/ckan/requirements.txt; \
pip install gunicorn
RUN set -ex; \
# ckanext-xloader
pip install -e git+https://github.com/ckan/ckanext-xloader.git#egg=ckanext-xloader; \
pip install -r src/ckanext-xloader/requirements.txt; \
# ckanext-dcat
pip install -e git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat; \
pip install -r src/ckanext-dcat/requirements.txt
COPY ckan.ini .
COPY web.sh .
COPY worker.sh .
RUN set -ex; \
ckan generate config default.ini; \
ln -s src/ckan/who.ini who.ini; \
ln -s src/ckan/wsgi.py wsgi.py; \
chmod +x web.sh worker.sh; \
chown -R ckan:ckan $CKAN_HOME
USER ckan
EXPOSE 8000
CMD ["/opt/ckan/web.sh"]