check-in first files
This commit is contained in:
25
dockerfile
Normal file
25
dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
# Keeps Python from generating .pyc files in the container
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
#install ping for some network tests:
|
||||
RUN apt-get update || : && apt-get install -y iputils-ping
|
||||
|
||||
# Turns off buffering for easier container logging
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Install pip requirements
|
||||
COPY . .
|
||||
RUN python -m pip install -r requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./lib /app/src/lib
|
||||
COPY ./services/scheduler /app
|
||||
|
||||
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
||||
USER appuser
|
||||
|
||||
# Start Server for API:
|
||||
CMD ["python", "./src/watchdog.py"]
|
||||
Reference in New Issue
Block a user