diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cb09388..ec5c871 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ -FROM python:3.12 +FROM python:3.12-bullseye -RUN apt update && apt upgrade -y && apt install -y chromium xvfb +RUN apt update && apt upgrade -y && apt install -y chromium chromium-driver xvfb RUN curl -sSL https://install.python-poetry.org | python3 - \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 50ec225..41d8225 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -32,6 +32,7 @@ "8181:8191" ], "features": { - "ghcr.io/devcontainers-extra/features/act:1": {} + "ghcr.io/devcontainers-extra/features/act:1": {}, + "ghcr.io/devcontainers/features/desktop-lite:1": {} } } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 02f10d5..86330fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-slim +FROM python:3.12-slim-bullseye # Inspired by https://github.com/Hudrolax/uc-docker-alpine/ @@ -19,7 +19,7 @@ ENV \ WORKDIR /app EXPOSE 8191 RUN apt update &&\ - apt install -y xvfb scrot python3-tk curl chromium + apt install -y xvfb scrot python3-tk curl chromium chromium-driver RUN curl -sSL https://install.python-poetry.org | python3 - ENV PATH="${HOME}/.local/bin:$PATH" @@ -28,4 +28,5 @@ RUN poetry install COPY . . HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "http://localhost:8191/health" ] +RUN ln /usr/bin/chromedriver ./.venv/lib/python3.12/site-packages/seleniumbase/drivers/uc_driver CMD ["./cmd.sh"] \ No newline at end of file