File size: 523 Bytes
b55edf5
9c63c3d
d2d6db4
 
 
 
 
 
 
 
0b7394f
9c63c3d
 
 
d2d6db4
 
 
9c63c3d
d2d6db4
9c63c3d
 
 
b55edf5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.11-slim-bookworm

ENV PYTHONUNBUFFERED=1 \
    PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \
    SERVER_HOST=0.0.0.0 \
    SERVER_PORT=7860

RUN useradd -m -u 1000 user
RUN mkdir -p /ms-playwright /app && chown -R user:user /ms-playwright /app

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
RUN playwright install --with-deps chromium && chmod -R 755 /ms-playwright

COPY --chown=user:user . .

USER user

EXPOSE 7860

CMD ["python", "main.py"]