This repository has been archived by the owner on Oct 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
61 lines (49 loc) · 1.66 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 phusion/baseimage:0.9.18
MAINTAINER "Benjamin Adams <[email protected]>"
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && \
apt-get install -q -y git \
libgeos-dev \
libxml2-dev \
libxslt1-dev \
libffi-dev \
libhdf5-dev \
libcurl4-openssl-dev \
autoconf \
python-dev \
python-pip \
libgdal-dev \
libudunits2-dev \
libyaml-dev \
redis-tools \
liblapack3 \
libfreetype6-dev
RUN curl 'ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.4.1.tar.gz' -o netcdf-4.4.1.tar.gz \
&& tar -zxvf netcdf-4.4.1.tar.gz \
&& cd netcdf-4.4.1 \
&& ./configure --prefix=/usr \
&& make \
&& make install \
&& cd .. \
&& rm -rf netcdf-4*
RUN mkdir /service-monitor && \
mkdir /service-monitor/logs && \
mkdir /service-monitor/db
COPY app.py config.yml console manage.py requirements.txt web worker /service-monitor/
COPY ./contrib/scripts/install_python.sh ./contrib/scripts/install_captcha.sh /
RUN /install_python.sh && \
/install_captcha.sh && \
rm -rf /install_captcha.sh && \
rm -rf /install_python.sh && \
pip install numpy && \
pip install scipy && \
pip install gunicorn && \
pip install -r /service-monitor/requirements.txt
RUN useradd -m ioos
COPY ioos_catalog /service-monitor/ioos_catalog
RUN chown -R ioos:ioos /service-monitor
WORKDIR /service-monitor
COPY ./contrib/docker/my_init.d /etc/my_init.d
COPY ./contrib/scripts/manage.sh ./contrib/scripts/run_worker.sh /service-monitor/
COPY ./contrib/crontab /etc/crontab
RUN rm -rf /var/lib/apt/lists/*
CMD ["/sbin/my_init", "--", "/sbin/setuser", "ioos", "gunicorn", "-w", "2", "-b", "0.0.0.0:3000", "app:app"]