label xos images

Change-Id: I0501b2774376990a5088838a8cc68d6f55e057f8
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index 3ee2562..97c4c92 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -1,20 +1,4 @@
-#!/usr/bin/env python
-#
-# Copyright 2016 the original author or authors.
-#
-# 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.
-#
-
+# xosproject/chameleon
 FROM xosproject/xos-base
 
 MAINTAINER Scott Baker    <scottb@onlab.us>
@@ -22,6 +6,29 @@
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
 MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
 
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=chameleon
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+ARG org_opencord_component_chameleon_version=unknown
+ARG org_opencord_component_chameleon_vcs_url=unknown
+ARG org_opencord_component_chameleon_vcs_ref=unknown
+
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+      org.opencord.component.chameleon.version=$org_opencord_component_chameleon_version \
+      org.opencord.component.chameleon.vcs-url=$org_opencord_component_chameleon_vcs_url \
+      org.opencord.component.chameleon.vcs-ref=$org_opencord_component_chameleon_vcs_ref
+
 # xos-base already has protoc and dependencies installed
 
 # Bundle app source
diff --git a/containers/postgresql/Dockerfile b/containers/postgresql/Dockerfile
index 4d4ebfd..68cd4ad 100644
--- a/containers/postgresql/Dockerfile
+++ b/containers/postgresql/Dockerfile
@@ -1,4 +1,22 @@
-FROM ubuntu
+# xosproject/xos-postgres
+FROM ubuntu:14.04.5
+
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-postgres
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
 
 RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
 
diff --git a/containers/xos/Dockerfile.UI b/containers/xos/Dockerfile.UI
index cd20156..979d67b 100644
--- a/containers/xos/Dockerfile.UI
+++ b/containers/xos/Dockerfile.UI
@@ -1,10 +1,22 @@
+# xosproject/xos-ui
 FROM xosproject/xos:candidate
 
-ARG XOS_GIT_COMMIT_HASH=unknown
-ARG XOS_GIT_COMMIT_DATE=unknown
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-corebuilder
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
 
-LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
-LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
 
 # Install file from corebuilder
 ADD containers/xos/BUILD /
diff --git a/containers/xos/Dockerfile.base b/containers/xos/Dockerfile.base
index d3a5483..6e7f102 100644
--- a/containers/xos/Dockerfile.base
+++ b/containers/xos/Dockerfile.base
@@ -1,9 +1,25 @@
 # Dockerfile.base
 # This image isn't used, but installs the prereqs for the other XOS images
-
 FROM ubuntu:14.04.5
 MAINTAINER Zack Williams <zdw@cs.arizona.edu>
 
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-base
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
+
 # Install apt packages, including docker
 RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
     apt-transport-https \
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 3bba5c5..10baa0e 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -1,10 +1,28 @@
+# xosproject/xos-client
 FROM xosproject/xos-base:candidate
 
-ARG XOS_GIT_COMMIT_HASH=unknown
-ARG XOS_GIT_COMMIT_DATE=unknown
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-client
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+ARG org_opencord_component_chameleon_version=unknown
+ARG org_opencord_component_chameleon_vcs_url=unknown
+ARG org_opencord_component_chameleon_vcs_ref=unknown
 
-LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
-LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+      org.opencord.component.chameleon.version=$org_opencord_component_chameleon_version \
+      org.opencord.component.chameleon.vcs-url=$org_opencord_component_chameleon_vcs_url \
+      org.opencord.component.chameleon.vcs-ref=$org_opencord_component_chameleon_vcs_ref
 
 # Install XOS client
 ADD xos/xos_client /tmp/xos_client
diff --git a/containers/xos/Dockerfile.corebuilder b/containers/xos/Dockerfile.corebuilder
index bf0a508..62d4952 100644
--- a/containers/xos/Dockerfile.corebuilder
+++ b/containers/xos/Dockerfile.corebuilder
@@ -1,10 +1,22 @@
+# xosproject/xos-corebuilder
 FROM xosproject/xos-base:candidate
 
-ARG XOS_GIT_COMMIT_HASH=unknown
-ARG XOS_GIT_COMMIT_DATE=unknown
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-corebuilder
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
 
-LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
-LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
 
 # Install the corebuilder tools and the tosca custom_types that it needs
 ADD xos/tools/corebuilder /opt/xos/tools/corebuilder
diff --git a/containers/xos/Dockerfile.devel b/containers/xos/Dockerfile.devel
index 1062756..c9fa9d8 100644
--- a/containers/xos/Dockerfile.devel
+++ b/containers/xos/Dockerfile.devel
@@ -1,10 +1,22 @@
+# xosproject/xos (devel)
 FROM xosproject/xos-base
 
-ARG XOS_GIT_COMMIT_HASH=unknown
-ARG XOS_GIT_COMMIT_DATE=unknown
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
 
-LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
-LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
 
 # Install XOS
 ADD xos /opt/xos
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index c550c77..33a42a3 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -1,5 +1,23 @@
+# xosproject/xos-synchronizer-base
 FROM xosproject/xos-client:candidate
 
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-synchronizer-base
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
+
 ADD xos/synchronizers/new_base /opt/xos/synchronizers/new_base
 ADD xos/xos/config.py /opt/xos/xos/config.py
 ADD xos/xos/logger.py /opt/xos/xos/logger.py
diff --git a/containers/xos/Dockerfile.test b/containers/xos/Dockerfile.test
index 2df13a6..6bd9c62 100644
--- a/containers/xos/Dockerfile.test
+++ b/containers/xos/Dockerfile.test
@@ -1,5 +1,23 @@
+# xosproject/xos-test
 FROM xosproject/xos:candidate
 
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos-test
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
+
 # install nodejs
 COPY containers/xos/nodesource.gpg.key /tmp/nodesource.gpg.key
 
diff --git a/containers/xos/Dockerfile.xos b/containers/xos/Dockerfile.xos
index 4e311bc..a92560e 100644
--- a/containers/xos/Dockerfile.xos
+++ b/containers/xos/Dockerfile.xos
@@ -1,10 +1,22 @@
+# xosproject/xos
 FROM xosproject/xos-base:candidate
 
-ARG XOS_GIT_COMMIT_HASH=unknown
-ARG XOS_GIT_COMMIT_DATE=unknown
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=xos
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
 
-LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
-LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
 
 # Install XOS
 ADD xos /opt/xos
diff --git a/group_vars/all b/group_vars/all
index 81134ee..7adf249 100644
--- a/group_vars/all
+++ b/group_vars/all
@@ -60,7 +60,7 @@
 build_optional_images: False
 
 docker_optional_images:
-  - name: "xosprojext/xos-test"
+  - name: "xosproject/xos-test"
     dockerfile: "Dockerfile.test"
     pull: False
     publish: False