Auto-generated by Trail System
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM python:3.9-slim as build
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --user -r requirements.txt
|
||||
|
||||
FROM python:3.9-slim
|
||||
WORKDIR /app
|
||||
COPY --from=build /root/.local /root/.local
|
||||
COPY . .
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends adduser && adduser --disabled-password --gecos '' appuser && chown -R appuser /app
|
||||
USER appuser
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
CMD ["python", "app.py"]
|
||||
Reference in New Issue
Block a user