switch to bullseye to fix chromium not launching on arm

This commit is contained in:
Thephaseless 2024-11-26 12:19:52 +00:00
parent 369faea1c3
commit d7bbb3280e
3 changed files with 7 additions and 5 deletions

View File

@ -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 - RUN curl -sSL https://install.python-poetry.org | python3 -

View File

@ -32,6 +32,7 @@
"8181:8191" "8181:8191"
], ],
"features": { "features": {
"ghcr.io/devcontainers-extra/features/act:1": {} "ghcr.io/devcontainers-extra/features/act:1": {},
"ghcr.io/devcontainers/features/desktop-lite:1": {}
} }
} }

View File

@ -1,4 +1,4 @@
FROM python:3.12-slim FROM python:3.12-slim-bullseye
# Inspired by https://github.com/Hudrolax/uc-docker-alpine/ # Inspired by https://github.com/Hudrolax/uc-docker-alpine/
@ -19,7 +19,7 @@ ENV \
WORKDIR /app WORKDIR /app
EXPOSE 8191 EXPOSE 8191
RUN apt update &&\ 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 - RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="${HOME}/.local/bin:$PATH" ENV PATH="${HOME}/.local/bin:$PATH"
@ -28,4 +28,5 @@ RUN poetry install
COPY . . COPY . .
HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "http://localhost:8191/health" ] 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"] CMD ["./cmd.sh"]