Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Cypress override baseUrl in Docker container not working

Hello Im looking for help.| I have a docker image that builds my Cypress tests in which I would like to override the baseURL. The problems is Cypress detects the baseUrl env variables but it doesn't apply them to the configuration and baseUrl still points to the localhost.

docker run \
      --name test \
      --env CI="true" \
      --env CYPRESS_BASE_URL="https://abrakada.com" \
      --env CYPRESS_baseUrl="https://abrakada.com" \
      --network="host" \
      --rm
FROM cypress/base:14.17.0

ARG TESTS_FOLDER=/opt/cypress-tests

ENV NODE_PATH=/opt:/usr/lib/node_modules:$TESTS_FOLDER/node_modules

WORKDIR $TESTS_FOLDER

COPY package.json ./package.json

RUN npm install && npm run cy:verify

COPY cypress.json ./cypress.json
COPY cypress ./cypress

ENTRYPOINT ["npm", "run", "cy:integration"]

{
  "baseUrl": "http://localhost:3000",
  "chromeWebSecurity": false,
  "screenshotOnRunFailure": false,
  "videoUploadOnPasses": false
}

> npm run cy:info && ./node_modules/.bin/cypress run


> app-tests@1.0.0 cy:info /opt/cypress-tests
> cypress info

Displaying Cypress info...

Detected no known browsers installed


Environment Variables:
CYPRESS_BASE_URL: https://abrakada.com
CYPRESS_baseUrl: https://abrakada.com

Application Data: /root/.config/cypress/cy/development
Browser Profiles: /root/.config/cypress/cy/development/browsers
Binary Caches: /root/.cache/Cypress

Cypress Version: 8.1.0
System Platform: linux (Debian - 10.9)
System Memory: 6.23 GB free 389 MB
Cypress could not verify that this server is running:

  > http://localhost:3000

We are verifying this server because it has been configured as your `baseUrl`.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

fsss I hate it. Like always after few hours of troubleshooting I post a question and then after 15 min of the post I find the problem... Gosh..

Anyway.

My problem was that I had plugins configuration for extending config file which caused rest of configuration not being merged.

https://github.com/bahmutov/cypress-extends

replaced return require('@bahmutov/cypress-extends')(config.configFile) with just config and baseUrl is being overwritten.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda