diff --git a/Jenkinsfile b/Jenkinsfile index 275e960df..2df345915 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -99,7 +99,7 @@ pipeline { script { sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - def image = docker.build('cypress-setup', '-f ./test/cypress/Dockerfile .') + def image = docker.build('lilium-dev', '-f docs/Dockerfile docs') image.inside("--network ${env.COMPOSE_PROJECT}_default -e TZ -e CI") { sh 'pwd' sh 'ls -l' diff --git a/docs/Dockerfile b/docs/Dockerfile index 25e6ec352..bbc49eb3c 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,16 +1,20 @@ -FROM node:lts-bookworm +FROM debian:12.9-slim -ENV SHELL bash -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" +ARG DEBIAN_FRONTEND=noninteractive -RUN npm install -g pnpm@8.15.1 && \ - pnpm setup && \ - pnpm install -g @quasar/cli@2.2.1 +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + gnupg2 \ + && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -y --no-install-recommends nodejs \ + && npm install -g corepack@0.31.0 \ + && corepack enable pnpm \ + && rm -rf /var/lib/apt/lists/* -RUN apt-get -y --fix-missing update && \ - apt-get -y --fix-missing upgrade && \ - apt-get -y --no-install-recommends install \ +RUN apt-get update \ + && apt-get -y --no-install-recommends install \ apt-utils \ chromium \ libasound2 \ @@ -25,3 +29,14 @@ RUN apt-get -y --fix-missing update && \ xvfb \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* + +RUN useradd -r -u 1000 -m -d /home/dev-user dev-user +USER dev-user + +ENV SHELL bash +ENV PNPM_HOME="/home/dev-user/.local/share/pnpm" +ENV PATH="$PNPM_HOME:$PATH" + +RUN pnpm setup \ + && pnpm install --global cypress@13.6.6 \ + && cypress install diff --git a/test/cypress/Dockerfile b/test/cypress/Dockerfile deleted file mode 100644 index b299fe46b..000000000 --- a/test/cypress/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM alexmorenovn/vndev:latest - -USER node -RUN pnpm install --global cypress@13.6.6 && cypress install -WORKDIR /app