17 lines
613 B
Docker
17 lines
613 B
Docker
FROM python:3.12
|
|
|
|
RUN apt update && apt install -y --no-install-recommends chromium chromium-driver curl
|
|
RUN apt autoclean && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /opt/app
|
|
RUN pip install --no-cache-dir selenium fastapi "uvicorn[standard]"
|
|
COPY . /opt/app/
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"]
|
|
|
|
# docker build -f Dockerfile -t selenium_app .
|
|
# docker run --rm -it --shm-size=512m --name selenium_app selenium_app
|
|
|
|
# docker exec -it selenium_app bash -c "curl localhost:80/get_missing_kids/?pages=5"
|
|
# docker exec -it selenium_app bash -c "curl localhost:80/get_missing_kids/?pages=-1"
|