fvp dockerfiles and script generation

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I9d0da9f58ea232162ae64a4041f5fa77c145d1b3
diff --git a/dockerfile-template b/dockerfile-template
new file mode 100644
index 0000000..97485c3
--- /dev/null
+++ b/dockerfile-template
@@ -0,0 +1,41 @@
+FROM ${OS}:${OS_VER} as FVP
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV PKG_DEPS="\
+    bc \
+    ca-certificates \
+    curl \
+    libatomic1 \
+    libdbus-1-3 \
+    openssh-server \
+    telnet \
+    xterm \
+"
+
+RUN set -e ;\
+    apt update -q=2 ;\
+    apt full-upgrade -q=2 --yes ;\
+    apt install -q=2 --yes --no-install-recommends ${PKG_DEPS} ;\
+    # Cleanup
+    apt clean ;\
+    rm -rf /var/lib/apt/lists/* /tmp/*
+
+FROM FVP
+
+WORKDIR ${MODEL_DIR}
+
+COPY setup-sshd /usr/sbin/setup-sshd
+
+# Add the FVP model tarball
+# NOTE: some tarballs contain an installer script others don't, so it may be the case
+# that the ADD instruction do install the model under /opt/model
+ADD ${MODEL}_${MODEL_VER}.tgz .
+
+# Install packages and model
+RUN ${MODEL_DIR}/${MODEL}.sh \
+        --i-agree-to-the-contained-eula \
+        --verbose \
+        --destination ${MODEL_DIR}/${MODEL} && rm -f ${MODEL_DIR}/${MODEL}.sh || true
+
+EXPOSE 22
+ENTRYPOINT ["/usr/sbin/setup-sshd"]