Skip to content
Snippets Groups Projects
Commit 62191f4e authored by sousaedu's avatar sousaedu Committed by Mark Beierl
Browse files

Fix bug 1706 - Adding non-root user to run MON


Change-Id: I66e7cab3f4707dbe05e17749abd154e05c852888
Signed-off-by: default avatarsousaedu <eduardo.sousa@canonical.com>
parent a8e75d03
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,22 @@ COPY --from=INSTALL /usr/bin/ssh /usr/bin/ssh
COPY --from=INSTALL /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/
COPY --from=INSTALL /lib/x86_64-linux-gnu/ /lib/x86_64-linux-gnu/
COPY scripts/ scripts/
COPY scripts/ /app/osm_mon/scripts/
# Creating the user for the app
RUN groupadd -g 1000 appuser && \
useradd -u 1000 -g 1000 -d /app appuser && \
mkdir -p /app/osm_mon && \
mkdir -p /app/storage/kafka && \
mkdir /app/log && \
chown -R appuser:appuser /app
WORKDIR /app/osm_mon
# Changing the security context
USER appuser
########################################################################
ENV OSMMON_MESSAGE_DRIVER kafka
ENV OSMMON_MESSAGE_HOST kafka
......
......@@ -64,10 +64,3 @@ spec:
envFrom:
- secretRef:
name: mon-secret
volumeMounts:
- name: mon-storage
mountPath: /app/database
volumes:
- name: mon-storage
hostPath:
path: /var/lib/osm/osm_mon_db/_data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment