Repository navigation
Expand file tree
/
Copy pathDockerfile.desktop-e2e
More file actions
96 lines (83 loc) · 2.39 KB
/
Copy pathDockerfile.desktop-e2e
File metadata and controls
96 lines (83 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# syntax=docker/dockerfile:1.7
# Desktop Electron E2E demo image.
#
# Build and run with:
# bash scripts/test-desktop-e2e-container.sh
FROM node:24.14.0-bookworm
ARG PNPM_VERSION=10.33.2
ENV CI=1 \
HUSKY=0 \
PNPM_HOME=/pnpm \
PNPM_STORE_DIR=/pnpm/store \
XDG_CACHE_HOME=/workspace/.cache \
WDIO_BROWSER_DRIVER_CACHE_DIR=/workspace/.cache/wdio-browser-drivers \
ZCODE_E2E_CONTAINER=1 \
ZCODE_E2E_SPEC=./test/e2e/container-boot.test.ts,./test/e2e/smoke.test.ts,./test/e2e/e2ecase-regression.test.ts,./test/e2e/upstream-provider.test.ts \
ELECTRON_DISABLE_SECURITY_WARNINGS=1 \
TURBO_TELEMETRY_DISABLED=1
ENV PATH="${PNPM_HOME}:${PATH}"
# 使用 HTTPS 避免本机或 CI 的 HTTP 代理误拦带 URL 编码的 Debian 包路径。
RUN sed -i 's|http://deb.debian.org|https://deb.debian.org|g' /etc/apt/sources.list.d/debian.sources && \
apt-get update -qq && \
apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
dbus \
dbus-x11 \
fonts-noto-cjk \
fonts-noto-color-emoji \
g++ \
git \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libsecret-1-0 \
libx11-6 \
libx11-xcb1 \
libxcb-dri3-0 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxkbcommon0 \
libxkbfile1 \
libxrandr2 \
libxrender1 \
libxshmfence1 \
libxss1 \
libxtst6 \
make \
openssh-client \
pkg-config \
procps \
python3 \
unzip \
wget \
xdg-utils \
xvfb \
xz-utils && \
rm -rf /var/lib/apt/lists/*
RUN corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
WORKDIR /workspace
COPY . .
RUN --mount=type=cache,id=zcode-desktop-e2e-pnpm-store,target=/pnpm/store \
pnpm config set store-dir "${PNPM_STORE_DIR}" && \
pnpm install --frozen-lockfile
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends xauth && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p "${WDIO_BROWSER_DRIVER_CACHE_DIR}"
CMD ["bash", "-lc", "dbus-run-session -- pnpm --filter @zcode/desktop test:e2e ${EXTRA_WDIO_ARGS:-}"]