salix-front/Dockerfile.e2e

53 lines
997 B
Docker
Raw Normal View History

2025-02-05 08:32:02 +00:00
FROM node:lts-bookworm
ENV SHELL bash
2024-10-02 13:20:54 +00:00
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
2025-02-05 06:15:10 +00:00
RUN npm install -g pnpm@8.15.1 && \
pnpm setup
2024-10-02 13:20:54 +00:00
RUN apt-get -y --fix-missing update && \
apt-get -y --fix-missing upgrade && \
2025-02-05 06:15:10 +00:00
apt-get -y --no-install-recommends install \
apt-utils \
libgtk2.0-0 \
libgtk-3-0 \
libgbm-dev \
libnotify-dev \
libnss3 \
libxss1 \
libasound2 \
libxtst6 \
xauth \
xvfb \
chromium \
2025-02-05 07:52:07 +00:00
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
2024-10-02 13:20:54 +00:00
WORKDIR /app
2025-02-05 08:32:02 +00:00
COPY \
package.json \
.npmrc \
pnpm-lock.yaml \
./
2024-10-02 13:20:54 +00:00
2025-02-05 08:32:02 +00:00
# Verifica si node_modules existe; si no, instala dependencias
2025-02-05 07:52:07 +00:00
RUN if [ ! -d "node_modules" ]; then \
2025-02-05 08:32:02 +00:00
pnpm install; \
fi && \
pnpm install cypress && \
npx cypress install
COPY \
jsconfig.json \
quasar.extensions.json \
postcss.config.js \
cypress.config.js \
./
COPY test/cypress test/cypress
2025-02-05 06:15:10 +00:00
ENV CYPRESS_BROWSER=chrome
ENV CHROME_BIN=/usr/bin/chromium