OpenDroneMap-WebODM/Dockerfile

43 wiersze
1.6 KiB
Docker
Czysty Zwykły widok Historia

FROM python:3.5
2016-09-11 23:52:31 +00:00
MAINTAINER Piero Toffanin <pt@masseranolabs.com>
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH $PYTHONPATH:/webodm
# Prepare directory
RUN mkdir /webodm
WORKDIR /webodm
2016-11-08 14:40:59 +00:00
RUN curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
# Configure use of testing branch of Debian
RUN printf "Package: *\nPin: release a=stable\nPin-Priority: 900\n" > /etc/apt/preferences.d/stable.pref
RUN printf "Package: *\nPin: release a=testing\nPin-Priority: 750\n" > /etc/apt/preferences.d/testing.pref
RUN printf "deb http://mirror.steadfast.net/debian/ stable main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ stable main contrib non-free" > /etc/apt/sources.list.d/stable.list
RUN printf "deb http://mirror.steadfast.net/debian/ testing main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ testing main contrib non-free" > /etc/apt/sources.list.d/testing.list
2017-11-17 18:42:34 +00:00
# Install Node.js GDAL, nginx, letsencrypt
2017-11-17 18:48:28 +00:00
RUN apt-get -qq update && apt-get -qq install -t testing -y binutils libproj-dev gdal-bin nginx && apt-get -qq install -y nodejs gettext-base cron certbot
2017-11-17 18:42:34 +00:00
# Install pip reqs
ADD requirements.txt /webodm/
RUN pip install -r requirements.txt
ADD . /webodm/
# Setup cron
RUN ln -s /webodm/nginx/crontab /etc/cron.d/nginx-cron && chmod 0644 /webodm/nginx/crontab && service cron start
RUN git submodule update --init
WORKDIR /webodm/nodeodm/external/node-OpenDroneMap
RUN npm install
WORKDIR /webodm
2017-06-15 21:50:16 +00:00
RUN npm install -g webpack && npm install && webpack
RUN python manage.py collectstatic --noinput
RUN rm /webodm/webodm/secret_key.py
VOLUME /webodm/app/media