Skip to content

Commit 589b0aa

Browse files
committed
chore/security : eplicite non root user & healthcheck
1 parent 261ff0e commit 589b0aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/chatbot/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,12 @@ COPY --from=builder --chown=1000:1000 /app/.venv /app/.venv
3535
# Copy application code
3636
COPY chatbot.py chatbot.py
3737

38+
# Explicit non-root user (already set by base image)
39+
USER 1000
40+
41+
# Healthcheck: verify Python process is running
42+
HEALTHCHECK --interval=30s --timeout=10s --start-period=180s --retries=3 \
43+
CMD pgrep -f "python chatbot.py" || exit 1
44+
3845
# Run the application
3946
CMD ["python", "chatbot.py"]

0 commit comments

Comments
 (0)