-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
123 lines (102 loc) · 3.45 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM gohitech/django:djcelery
MAINTAINER Dean Taylor <[email protected]>
ENV DJANGO_PROJECT_NAME="tardis"
RUN apt-get update && apt-get -y install \
libfreetype6-dev \
libjpeg-dev \
libldap2-dev \
libsasl2-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
&& apt-get clean
RUN pip install --upgrade --no-cache-dir \
pip
RUN pip install --no-cache-dir \
anyjson==0.3.3 \
beautifulsoup4==4.6.0 \
feedparser==5.2.1 \
flexmock==0.10.2 \
html5lib==0.999999999 \
httplib2==0.10.3 \
ipython==2.4.1 \
pycrypto==2.6.1 \
pystache==0.5.4 \
python-dateutil==2.6.1 \
PyYAML==3.12 \
Wand==0.4.4
COPY src/mytardis/tardis/ tardis/
COPY src/mytardis/wsgi.py tardis/
COPY src/mytardis/mytardis.py ./
RUN ln -s mytardis.py manage.py
# Based on src/mytardis/build.sh
COPY ./src/mytardis/requirements-base.txt ./src/mytardis/requirements-docs.txt ./src/mytardis/requirements-test.txt ./
RUN pip install --no-cache-dir \
-r requirements-base.txt \
-r requirements-docs.txt \
-r requirements-test.txt
# from src/mytardis/package.json
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get update \
&& apt-get -y install \
nodejs \
&& apt-get clean
RUN npm install \
&& apt-get -y remove nodejs
# UserWarning: The psycopg2 wheel package will be renamed from release 2.8
# <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>
RUN pip install --no-cache-dir \
psycopg2-binary
# Publication forms
RUN pip install --no-cache-dir \
-r tardis/apps/publication_forms/requirements.txt
# mytardis-app-mydata
# https://github.com/mytardis/mytardis-app-mydata
COPY src/mydata ./tardis/apps/mydata/
RUN pip install --no-cache-dir \
-r ./tardis/apps/mydata/requirements.txt
# MyTardis LDAP authentication
RUN pip install --no-cache-dir \
python-ldap==2.4.45
# Bioformats
# https://github.com/keithschulze/mytardisbf
# openjdk-7-jdk \
# openjdk-8-jdk \
RUN apt-get update && apt-get -y install \
openjdk-8-jdk \
&& apt-get clean
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
RUN pip install -U --no-cache-dir \
numpy
RUN pip install --no-cache-dir -e git+https://github.com/keithschulze/[email protected]#egg=mytardisbf
ENV MYTARDIS_BIOFORMATS_ENABLE='False'
# https://pypi.python.org/pypi/django-generate-secret-key/1.0.2
RUN pip install --no-cache-dir \
django-generate-secret-key==1.0.2
# push_to
#RUN pip install --no-cache-dir \
# -r tardis/apps/push_to/requirements.txt
# nifcert
COPY ./src/nifcert/ nifcert/
ENV MYTARDIS_NIFCERT_ENABLE='False'
# Long user name and email address fix for AAF user name registration and student long emails
RUN pip install --no-cache-dir \
django-longerusernameandemail \
south
# Bioformats workaround
# Fix schema check migration timing issue; Bioformats fixture loaded in /docker-entrypoint.d/mytardisbf
COPY ./src/mytardisbf_apps.py /usr/src/app/src/mytardisbf/mytardisbf/apps.py
COPY ./src/forms.py /usr/src/app/tardis/tardis_portal/forms.py
COPY ./src/widgets.py /usr/src/app/tardis/tardis_portal/widgets.py
COPY docker-entrypoint.d/ /docker-entrypoint.d/
COPY docker-entrypoint_celery.d/ /docker-entrypoint_celery.d/
COPY settings.d/ ./settings.d/
COPY settings_pre.py ./settings_pre.py
ENV MYTARDIS_DEFAULT_INSTITUTION='The University of Western Australia'
RUN pip uninstall -y --no-cache-dir \
South