gpt4 book ai didi

docker - Cypress ci缺少libgtk-x11-2.0.so.0

转载 作者:行者123 更新时间:2023-12-02 18:28:35 25 4
gpt4 key购买 nike

我正在用环ci运行 Cypress 。使用球体时可以使用,但不能。我试图同时启动两个客户端服务器和节点服务器。似乎我在Docker容器中缺少包装或其他东西。

我愿意改回使用cypress orb,但是我不确定如何在运行cypress/run之前将其设置为同时运行两个服务器

> If you are using Docker, we provide containers with all required dependencies installed.
----------

/home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
----------

Platform: linux (Debian - 8.11)
Cypress Version: 3.1.5

步骤如下:
docker:
# specify the version you desire here
- image: circleci/node:10.8.0
- image: circleci/postgres:9.6
environment:
POSTGRES_USER: postgres
POSTGRES_DB: dnb
- image: redis
- image: cypress/base:10
environment:
TERM: xterm
steps:
- checkout

- restore_cache:
keys:
- v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
- v1-deps-{{ .Branch }}
- v1-deps

- run:
name: Install Dependencies
command: npm install

- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
# cache NPM modules and the folder with the Cypress binary
paths:
- ~/.npm
- ~/.cache

# - run:
# name: Run test
# command: npm test -- --coverage --forceExit --detectOpenHandles --maxWorkers=10
# no_output_timeout: 3m

# - run:
# name: Send codecov coverage report
# command: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -t

- run:
name: run client server
command: npm start
background: true

- run:
name: Pull server
command: cd && git clone ....git && ls

- run:
name: run node server
command: cd && cd ..i && npm install && npm run dev:prepare && npm start
background: true

- run: npm run cypress:run

最佳答案

您实际上并没有在cypress/base:10 docker镜像中执行cypress。

参见CircleCI docs for multiple images:

In a multi-image configuration job, all steps are executed in the container created by the first image listed.



您应该尝试以下方法:

docker:
# specify the version you desire here
- image: cypress/base:10
environment:
TERM: xterm
- image: circleci/postgres:9.6
environment:
POSTGRES_USER: postgres
POSTGRES_DB: dnb
- image: redis

关于docker - Cypress ci缺少libgtk-x11-2.0.so.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54795383/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com