build(docker): fix playwright setup
This commit is contained in:
+7
-6
@@ -23,18 +23,19 @@ COPY static ./
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM python:3.14-slim
|
FROM python:3.14-slim
|
||||||
|
|
||||||
|
ENV PLAYWRIGHT_BROWSERS_PATH="/opt/playwright-browsers"
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
|
pip install playwright && \
|
||||||
|
playwright install --with-deps chromium
|
||||||
|
|
||||||
ENV PATH="/app/.venv/bin:$PATH"
|
ENV PATH="/app/.venv/bin:$PATH"
|
||||||
ENV PLAYWRIGHT_BROWSERS_PATH=/root/pw-browsers
|
|
||||||
ENV TZ="Europe/Moscow"
|
ENV TZ="Europe/Moscow"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=builder /app ./
|
COPY --from=builder /app ./
|
||||||
RUN --mount=type=cache,target=/root/pw-browsers \
|
|
||||||
--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
||||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
||||||
.venv/bin/playwright install chromium --with-deps --only-shell
|
|
||||||
|
|
||||||
COPY --from=node-builder /app/dist ./static/dist
|
COPY --from=node-builder /app/dist ./static/dist
|
||||||
|
|
||||||
COPY gallery gallery/
|
COPY gallery gallery/
|
||||||
|
|||||||
Reference in New Issue
Block a user