From b276c5938b600f86ae7518882623c821aab9ace9 Mon Sep 17 00:00:00 2001
From: "Eby, Robert (re2429)" <re2429@att.com>
Date: Mon, 17 Jun 2019 15:14:03 -0400
Subject: [PATCH] Add files needed for docker build

Signed-off-by: Eby, Robert (re2429) <re2429@att.com>
Change-Id: I153eaa6a466c1944ae856b5082ef5860ff606d43
---
 Dockerfile         |  1 +
 build-container.sh | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 Dockerfile
 create mode 100755 build-container.sh

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..1aab3d0
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1 @@
+# This file is required in the root directory in order to force build-container.sh to be run.
diff --git a/build-container.sh b/build-container.sh
new file mode 100755
index 0000000..63e1534
--- /dev/null
+++ b/build-container.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+#
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export DOCKER_REPO='nexus3.akraino.org:10003'
+STAGING_BUILD=${STAGING_BUILD:=''}
+AUTOSTAGING=${AUTOSTAGING:=''}
+
+set -e -u -x -o pipefail
+
+# In lieu of anything else, the build number will have to serve as the version
+VERSION=0.0.$BUILD_NUMBER
+if [ -n "$STAGING_BUILD" -a -n "$AUTOSTAGING" ]
+then
+    DOCKER_REPO='nexus3.akraino.org:10004'
+fi
+
+cd remote-installer/scripts/
+./build.sh
+docker tag remote-installer:latest ${DOCKER_REPO}/akraino/remote-installer:latest
+docker tag remote-installer:latest ${DOCKER_REPO}/akraino/remote-installer:${VERSION}
+
+docker images
+docker push                        ${DOCKER_REPO}/akraino/remote-installer:latest
+docker push                        ${DOCKER_REPO}/akraino/remote-installer:${VERSION}
-- 
2.16.6