This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
forked from GeoNode/django-osgeo-importer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (46 loc) · 1.94 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
FROM ubuntu:14.04
WORKDIR /django-osgeo-uploader
ENV DEBIAN_FRONTEND=noninteractive
ADD packages.txt /django-osgeo-uploader/
RUN \
apt-get update -qq && \
apt-get upgrade -yqq && \
apt-get install -yqq wget software-properties-common && \
add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y && \
apt-get update -qq && \
xargs apt-get install -y --no-install-recommends --force-yes <packages.txt
ENV GS_VERSION=2.8.x
ADD downloads/gdal-2.1.0-linux-bin.tar.gz /django-osgeo-uploader/
ADD downloads/jetty-runner-8.1.8.v20121106.jar /django-osgeo-uploader/gs/
ADD downloads/geoserver-${GS_VERSION}-latest-war.zip /django-osgeo-uploader/gs/
ADD downloads/geoserver.war /django-osgeo-uploader/gs/
ENV PATH=/usr/local/lib/gdal/bin:$PATH
ENV GDAL_DATA=/usr/local/lib/gdal/share/gdal/
RUN \
chmod +x gs/jetty-runner-8.1.8.v20121106.jar && \
chmod +x gs/geoserver-${GS_VERSION}-latest-war.zip && \
mv gdal-2.1.0-linux-bin /usr/local/lib/gdal && \
touch /usr/lib/python2.7/dist-packages/gdal.pth && \
echo '/usr/local/lib/gdal/lib/python2.7/site-packages' > /usr/lib/python2.7/dist-packages/gdal.pth && \
echo '/usr/local/lib/gdal/lib/' >> /etc/ld.so.conf && \
ldconfig
ADD requirements.txt /django-osgeo-uploader/
ADD setup.py /django-osgeo-uploader/
ADD setup.cfg /django-osgeo-uploader/
RUN \
pip install psycopg2 && \
pip install -r requirements.txt && \
pip install awscli
ENV DJANGO_SETTINGS_MODULE=osgeo_importer_prj.settings
ADD osgeo_importer /django-osgeo-uploader/osgeo_importer
ADD osgeo_importer_prj /django-osgeo-uploader/osgeo_importer_prj
ADD scripts /django-osgeo-uploader/scripts
ADD manage.py /django-osgeo-uploader/
ADD setup.py /django-osgeo-uploader/
ADD setup.cfg /django-osgeo-uploader/
ADD README.md /django-osgeo-uploader/
RUN pip install -e .
ADD downloads/importer-test-files /django-osgeo-uploader/importer-test-files
CMD /bin/bash -c "service postgresql start; scripts/before_script.sh; /bin/bash"
EXPOSE 80
EXPOSE 8080