Update and improve dev container: (#3977)

- Replace deprecated `crates` extension with `dependi`
- Add Playwright extension
- Simplify Dockerfile
- Add dependencies as specified in the Dioxus documentation
- Pre-install Playwright dependencies
- Adjust README.md
This commit is contained in:
Leon Wimbes authored and GitHub committed 2025-04-15 14:22:40 -07:00
1 parent 93a557c322
commit 5f01d79907
3 files changed
+37 -5

No files matched your search

+23 -4
View File
@@ -1,8 +1,27 @@
ARG VARIANT="nightly-bookworm-slim"
FROM rustlang/rust:${VARIANT}
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq install build-essential libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
# Install required system libraries and NPM
# Reference: https://dioxuslabs.com/learn/0.6/contributing/#before-you-contribute
RUN apt-get update -qq \
&& apt-get install -y -qq \
libgdk3.0-cil \
libatk1.0-dev \
libcairo2-dev \
libpango1.0-dev \
libgdk-pixbuf2.0-dev \
libsoup-3.0-dev \
libjavascriptcoregtk-4.1-dev \
libwebkit2gtk-4.1-dev \
npm \
&& rm -rf /var/lib/apt/lists/*
# Set a shared folder for pre-installed browsers
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
# Temporarily install Playwright globally to install the browsers and their dependencies
RUN npm install -g @playwright/test && \
npx playwright install --with-deps && \
npm uninstall -g @playwright/test