-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.common
120 lines (99 loc) · 5.21 KB
/
Dockerfile.common
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
FROM ubuntu:16.04
MAINTAINER Kitware, Inc. <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -qy \
curl \
software-properties-common \
python-software-properties \
&& add-apt-repository ppa:ubuntugis/ppa \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get update \
&& apt-get install -qy \
build-essential \
git \
libcairo-dev \
libcurl4-openssl-dev \
libffi-dev \
libjpeg-dev \
libjpeg8-dev \
libldap2-dev \
libpython-dev \
libsasl2-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
nodejs \
openssl \
python \
python-pip \
python-tk \
wget \
zlib1g-dev \
&& apt-get build-dep -qy \
gdal \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip as a separate command from upgrading setuptools. If the major
# version of pip changes, these seems to be necessary.
RUN pip install --no-cache-dir -U pip
RUN pip install --no-cache-dir -U setuptools
RUN echo 'NODE VERSION' \
&& echo '------------' \
&& node --version \
&& echo \
&& echo 'NPM VERSION' \
&& echo '-----------' \
&& npm --version
ARG MAKE_PARALLELISM
RUN mkdir /tmp/gdal \
&& curl -s -o - http://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz \
| tar -xzf - -C /tmp/gdal --strip-components 1 \
&& cd /tmp/gdal \
&& ./configure --prefix=/usr \
&& make $MAKE_PARALLELISM \
&& make install \
&& cd / \
&& rm -rf /tmp/gdal
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
ENV C_FORCE_ROOT=1
RUN pip install GDAL==$(gdal-config --version)
RUN mkdir -p /girder-components/plugins
ADD submodules/girder /girder
RUN sed -i "s|'boto3',|'boto3>=1.7,<1.8',\n 'botocore<1.11.0', |g" /girder/setup.py
RUN cd /girder \
&& pip install -e /girder[plugins] \
&& pip install -r /girder/requirements-dev.txt \
&& pip install -e /girder/clients/python \
&& pip install ansible \
&& ansible-galaxy install -p /etc/ansible/roles girder.girder
RUN cd /girder \
&& npm install -g grunt-cli \
&& npm install --production --unsafe-perm
ADD submodules/girder_geospatial /girder-components/plugins/girder_geospatial
RUN girder-install plugin -f /girder-components/plugins/girder_geospatial \
&& pip install -e /girder-components/plugins/girder_geospatial/types/raster/ \
&& pip install -e /girder-components/plugins/girder_geospatial/types/vector/
ADD submodules/large_image /girder-components/plugins/large_image
RUN pip install numpy==1.10.2 \
&& pip install -e /girder-components/plugins/large_image[mapnik] \
&& girder-install plugin -f /girder-components/plugins/large_image
ADD client/resonantgeoview/resonantgeoview_server /girder-components/plugins/resonantgeoview_server
RUN girder-install plugin -f /girder-components/plugins/resonantgeoview_server
ADD geoviz_server /girder-components/plugins/geoviz_server
RUN girder-install plugin -f /girder-components/plugins/geoviz_server
# COPY etc/worker.local.cfg /usr/local/lib/python2.7/dist-packages/girder_worker/worker.local.cfg
RUN girder-install web --dev --plugins large_image
ADD client /geoviz_client
RUN cd /geoviz_client \
&& npm install \
&& npm run build \
&& mv dist ../girder/clients/web/static/external \
&& cd ..
COPY etc/common-entrypoint.sh /entrypoint.sh
COPY etc/provision.yml /provision.yml
COPY etc/provision-inventory /etc/ansible/hosts
EXPOSE 8080
ENTRYPOINT ["bash", "/entrypoint.sh"]
CMD ["--web"]