+RUN curl $PYTHON3_OSM_NBI_URL -o osm_nbi.deb
+RUN dpkg -i ./osm_nbi.deb
+
+RUN pip3 install \
+ -r /usr/lib/python3/dist-packages/osm_common/requirements.txt \
+ -r /usr/lib/python3/dist-packages/osm_im/requirements.txt \
+ -r /usr/lib/python3/dist-packages/osm_nbi/requirements.txt
+
+#######################################################################################
+FROM ubuntu:20.04 as FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ python3-minimal=3.8.* \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN rm -f /etc/apt/apt.conf.d/proxy.conf
+
+COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
+COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
+
+# Creating the user for the app
+RUN groupadd -g 1000 appuser && \
+ useradd -u 1000 -g 1000 -d /app appuser && \
+ mkdir -p /app/osm_nbi && \
+ mkdir -p /app/storage/kafka && \
+ mkdir /app/log && \
+ chown -R appuser:appuser /app