Update Dockerfiles to install osm-common from git repo

Change-Id: I013357affd57cf8b56fea8e9746c332524db0428
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/docker/LCM/Dockerfile b/docker/LCM/Dockerfile
index 97ebd09..0e025f7 100644
--- a/docker/LCM/Dockerfile
+++ b/docker/LCM/Dockerfile
@@ -39,6 +39,7 @@
     apt-transport-https=2.4.* \
     gnupg2=2.2.* \
     openssh-client=1:8.* \
+    git \
     && rm -rf /var/lib/apt/lists/*
 
 # https://kubernetes.io/releases/
@@ -52,17 +53,20 @@
     && mv linux-amd64/helm /usr/local/bin/helm3 \
     && rm -r linux-amd64/
 
-ARG PYTHON3_OSM_COMMON_URL
+ARG COMMON_GERRIT_REFSPEC=master
+RUN git clone --filter=blob:none --tags https://osm.etsi.org/gerrit/osm/common.git /tmp/osm-common && \
+    cd /tmp/osm-common && \
+    git fetch origin ${COMMON_GERRIT_REFSPEC} && \
+    git checkout FETCH_HEAD && \
+    cd - && \
+    pip install --no-cache-dir -r /tmp/osm-common/requirements.txt && \
+    pip install /tmp/osm-common
+
 ARG PYTHON3_OSM_LCM_URL
-
-RUN curl $PYTHON3_OSM_COMMON_URL -o osm_common.deb
-RUN dpkg -i ./osm_common.deb
-
 RUN curl $PYTHON3_OSM_LCM_URL -o osm_lcm.deb
 RUN dpkg -i ./osm_lcm.deb
 
 RUN pip3 install \
-    -r /usr/lib/python3/dist-packages/osm_common/requirements.txt \
     -r /usr/lib/python3/dist-packages/osm_lcm/requirements.txt
 
 #######################################################################################