-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
+COPY --from=INSTALL /usr/bin/osm /usr/bin/osm
+COPY charm.sh /usr/sbin/charm
+
+# Creating the user for the app
+RUN groupadd -g 1000 appuser && \
+ useradd -u 1000 -g 1000 -d /app appuser && \
+ mkdir -p /app/osmclient && \
+ chown -R appuser:appuser /app
+
+WORKDIR /app/osmclient
+
+# Changing the security context
+USER appuser
+
+ENV LC_ALL=C.UTF-8
+ENV LANG=C.UTF-8
+
+# The following ENV can be added with "docker run -e xxx' to configure
+ENV OSM_HOSTNAME nbi:9999
+ENV OSM_USER admin
+ENV OSM_PASSWORD admin
+ENV OSM_PROJECT admin