Improve documentation
[nonrtric.git] / test / usecases / oruclosedlooprecovery / scriptversion / app / Dockerfile
index d5d6c2c..21b24b1 100644 (file)
@@ -22,6 +22,20 @@ COPY . /usr/src/app/
 
 WORKDIR /usr/src/app
 
+## install curl & ping to help debug
+RUN apt update
+RUN apt install curl -y
+RUN apt-get install iputils-ping -y
+
 RUN pip install -r requirements.txt
 
-CMD [ "python3", "main.py" ]
+ARG user=nonrtric
+ARG group=nonrtric
+
+RUN groupadd $user && \
+    useradd -r -g $group $user
+RUN chown -R $user:$group /usr/src/app/
+
+USER ${user}
+
+CMD [ "python3", "-u", "main.py" ]