Add docker file for master image
Change-Id: I22e5ddd34d588e006deb23ca3c879b7686e8caeb
Related-prod: PRODX-1260
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..b7759b4
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,35 @@
+ARG FROM=ubuntu:bionic
+FROM $FROM
+
+
+COPY horizon/ opt/horizon
+RUN apt-get update && apt-get install -y \
+ python3 \
+ python-dev \
+ python3-dev \
+ build-essential \
+ libssl-dev \
+ libffi-dev \
+ libxml2-dev \
+ libxslt1-dev \
+ zlib1g-dev \
+ python-pip \
+ firefox \
+ xvfb \
+ tox \
+ wget \
+ git \
+ x11-xkb-utils
+
+ENV DISPLAY=1
+
+RUN wget https://artifactory.mcp.mirantis.net/artifactory/binary-dev-local/tarballs/geckodriver-v0.24.0-linux64.tar.gz
+RUN tar xvzf geckodriver-v0.24.0-linux64.tar.gz && \
+ chmod +x geckodriver && \
+ sudo cp geckodriver /usr/local/bin/
+
+WORKDIR /opt/horizon
+
+RUN pip install -r requirements.txt && \
+ pip install -r test-requirements.txt
+
diff --git a/pre-build.sh b/pre-build.sh
new file mode 100644
index 0000000..5cbed9d
--- /dev/null
+++ b/pre-build.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+#Clone Horizon for running tests
+
+set -ex
+
+GERRIT_SCHEME=${GERRIT_SCHEME:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\1|p')}
+GERRIT_NAME=${GERRIT_NAME:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\2|p')}
+GERRIT_HOST_PORT=${GERRIT_HOST_PORT:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\3|p')}
+HORIZON_LIB_REPO="${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST_PORT}/packaging/sources/horizon"
+GERRIT_BRANCH=${GERRIT_BRANCH:-master}
+
+git clone ${HORIZON_LIB_REPO}
+cd horizon/ ; git checkout ${GERRIT_BRANCH}
+