2020-07-25 11:04:16 +02:00
|
|
|
FROM ubuntu:18.04
|
2020-07-25 14:48:17 +02:00
|
|
|
ARG tz_buildtime=Europe/Rome
|
|
|
|
ENV TZ=$tz_buildtime
|
2020-07-25 11:04:16 +02:00
|
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
2016-08-27 10:29:20 +02:00
|
|
|
|
2018-12-09 13:29:31 +01:00
|
|
|
# Make sure that all updates are in place
|
|
|
|
RUN apt-get clean && apt-get update -y && apt-get upgrade -y \
|
|
|
|
&& apt-get dist-upgrade -y && apt-get autoremove -y
|
|
|
|
|
|
|
|
# Install needed packages
|
|
|
|
RUN apt-get install git python-dev build-essential \
|
|
|
|
libffi-dev libssl-dev libfuzzy-dev wget sudo -y
|
2017-10-01 02:23:32 +02:00
|
|
|
|
|
|
|
# Adding sudo command
|
|
|
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
|
|
|
RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
|
|
|
2017-10-01 02:29:56 +02:00
|
|
|
# Installing AIL dependencies
|
2018-12-09 13:29:31 +01:00
|
|
|
RUN mkdir /opt/AIL
|
2016-08-27 10:29:20 +02:00
|
|
|
ADD . /opt/AIL
|
|
|
|
WORKDIR /opt/AIL
|
2017-10-01 02:23:32 +02:00
|
|
|
RUN ./installing_deps.sh
|
2017-10-01 02:29:56 +02:00
|
|
|
WORKDIR /opt/AIL
|
|
|
|
|
2018-06-22 22:57:35 +02:00
|
|
|
# Default to UTF-8 file.encoding
|
|
|
|
ENV LANG C.UTF-8
|
2019-03-11 23:04:02 +01:00
|
|
|
ENV AIL_HOME /opt/AIL
|
|
|
|
ENV AIL_BIN ${AIL_HOME}/bin
|
|
|
|
ENV AIL_FLASK ${AIL_HOME}/var/www
|
|
|
|
ENV AIL_REDIS ${AIL_HOME}/redis/src
|
|
|
|
ENV AIL_ARDB ${AIL_HOME}/ardb/src
|
|
|
|
ENV AIL_VENV ${AIL_HOME}/AILENV
|
|
|
|
|
|
|
|
ENV PATH ${AIL_VENV}/bin:${AIL_HOME}:${AIL_REDIS}:${AIL_ARDB}:${AIL_BIN}:${AIL_FLASK}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
2018-06-22 22:57:35 +02:00
|
|
|
|
2018-09-03 16:01:39 +02:00
|
|
|
RUN ./pystemon/install.sh
|
2019-03-11 23:04:02 +01:00
|
|
|
RUN pip install -r /opt/pystemon/requirements.txt
|
2018-09-03 16:01:39 +02:00
|
|
|
|
2018-09-04 09:20:57 +02:00
|
|
|
COPY docker_start.sh /docker_start.sh
|
|
|
|
ENTRYPOINT ["/bin/bash", "docker_start.sh"]
|