-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
50 lines (37 loc) · 1.37 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
FROM examonhpc/examon:0.2.0
ENV EXAMON_HOME /etc/examon_deploy/examon
# Create a backup of the existing sources.list
RUN mv /etc/apt/sources.list /etc/apt/sources.list.backup
# Create a new sources.list file
RUN touch /etc/apt/sources.list
# Debian strech moved to archived
RUN echo "deb https://debian.mirror.garr.it/debian-archive/ stretch main" > /etc/apt/sources.list
# Update repositories
RUN apt-get -y update
# Install dependencies
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
libffi-dev \
build-essential \
libssl-dev \
python-dev \
&& rm -rf /var/lib/apt/lists/*
# copy app
ADD ./lib/examon-common $EXAMON_HOME/lib/examon-common
ADD ./docker/examon/supervisor.conf /etc/supervisor/conf.d/supervisor.conf
ADD ./scripts/examon.conf $EXAMON_HOME/scripts/examon.conf
ADD ./web $EXAMON_HOME/web
# install
RUN pip --trusted-host pypi.python.org install --upgrade pip==20.1.1
ENV PIP $EXAMON_HOME/scripts/ve/bin/pip
WORKDIR $EXAMON_HOME/lib/examon-common
RUN $PIP install .
RUN pip install .
WORKDIR $EXAMON_HOME/web
RUN virtualenv flask
RUN flask/bin/pip --trusted-host pypi.python.org install --upgrade pip==20.1.1
RUN CASS_DRIVER_BUILD_CONCURRENCY=8 flask/bin/pip --trusted-host pypi.python.org install -r ./examon-server/requirements.txt
WORKDIR $EXAMON_HOME/scripts
EXPOSE 1883 9001
CMD ["./frontend_ctl.sh", "start"]