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", "message_generator.py" ]
+RUN groupadd -g 999 appuser && \
+ useradd -r -u 999 -g appuser appuser
+
+USER appuser
+
+CMD [ "python3", "-u", "message_generator.py" ]