1 FROM krallin/ubuntu-tini:16.04 2 3 LABEL name="Qinling" \ 4 description="Function Engine for OpenStack" \ 5 maintainers="Gaƫtan Trellu <gaetan.trellu@incloudus.com>" 6 7 RUN apt-get -qq update && \ 8 apt-get install -y \ 9 libffi-dev \ 10 libpq-dev \ 11 libssl-dev \ 12 libxml2-dev \ 13 libxslt1-dev \ 14 libyaml-dev \ 15 libmysqlclient-dev \ 16 python \ 17 python-dev \ 18 crudini \ 19 curl \ 20 git \ 21 gcc \ 22 libuv1 \ 23 libuv1-dev && \ 24 curl -f -o /tmp/get-pip.py https://bootstrap.pypa.io/3.2/get-pip.py && \ 25 python /tmp/get-pip.py && rm /tmp/get-pip.py && \ 26 pip install --upgrade pip 27 28 RUN pip install pymysql psycopg2 py_mini_racer 29 30 ENV QINLING_DIR="/opt/stack/qinling" \ 31 TMP_CONSTRAINTS="/tmp/upper-constraints.txt" \ 32 CONFIG_FILE="/etc/qinling/qinling.conf" \ 33 INI_SET="crudini --set /etc/qinling/qinling.conf" \ 34 MESSAGE_BROKER_URL="rabbit://guest:guest@rabbitmq:5672/" \ 35 DATABASE_URL="sqlite:///qinling.db" \ 36 UPGRADE_DB="false" \ 37 DEBIAN_FRONTEND="noninteractive" \ 38 QINLING_SERVER="all" \ 39 LOG_DEBUG="false" \ 40 AUTH_ENABLE="false" 41 42 # We install dependencies separatly for a caching purpose 43 COPY requirements.txt "${QINLING_DIR}/" 44 RUN curl -o "${TMP_CONSTRAINTS}" \ 45 http://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt && \ 46 sed -i "/^qinling.*/d" "${TMP_CONSTRAINTS}" && \ 47 pip install -r "${QINLING_DIR}/requirements.txt" 48 49 COPY . ${QINLING_DIR} 50 51 RUN pip install -e "${QINLING_DIR}" && \ 52 mkdir /etc/qinling && \ 53 rm -rf /var/lib/apt/lists/* && \ 54 find ${QINLING_DIR} -name "*.sh" -exec chmod +x {} \; 55 56 WORKDIR "${QINLING_DIR}" 57 EXPOSE 7070 58 CMD "${QINLING_DIR}/tools/docker/start.sh"