Add files needed for docker build 09/1009/1
authorEby, Robert (re2429) <re2429@att.com>
Mon, 17 Jun 2019 19:14:03 +0000 (15:14 -0400)
committerEby, Robert (re2429) <re2429@att.com>
Mon, 17 Jun 2019 19:16:57 +0000 (15:16 -0400)
Signed-off-by: Eby, Robert (re2429) <re2429@att.com>
Change-Id: I153eaa6a466c1944ae856b5082ef5860ff606d43

Dockerfile [new file with mode: 0644]
build-container.sh [new file with mode: 0755]

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..1aab3d0
--- /dev/null
@@ -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 (executable)
index 0000000..63e1534
--- /dev/null
@@ -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}