gpt4 book ai didi

由于 M1 芯片上的 Qemu 错误,Docker/Cypress 容器失败

转载 作者:行者123 更新时间:2023-12-04 12:28:46 29 4
gpt4 key购买 nike

我有一个 Docker 镜像,我想在本地运行,但我认为它由于 Qemu 的问题而失败,这似乎源于试图在 M1 芯片上运行 Cypress:

REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
dna local 097c5f291db5 2 hours ago 3.66GB
当我尝试使用 docker run dna:local 在本地运行图像时我得到以下信息:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
yarn run v1.22.10
$ concurrently "yarn:start:ui" "yarn:start:api" "cypress run"
[start:api] $ cd api && yarn start:dev
[start:ui] $ cd ui && yarn start
[2] [STARTED] Task without title.
[start:api] $ DEBUG=socket.io:* DISABLE_AD=1 USE_MEMORY_DB=true nodemon --inspect -r esm ./src/app.js
[2] [FAILED] Cypress failed to start.
[2] [FAILED]
[2] [FAILED] This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
[2] [FAILED]
[2] [FAILED] Please refer to the error below for more details.
[2] [FAILED]
[2] [FAILED] ----------
[2] [FAILED]
[2] [FAILED] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[2] [FAILED] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[2] [FAILED]
[2] [FAILED]
[2] [FAILED] #
[2] [FAILED] # Fatal error in , line 0
[2] [FAILED] # ignored
[2] [FAILED] #
[2] [FAILED] #
[2] [FAILED] #
[2] [FAILED] #FailureMessage Object: 0x4009bb9420
[2] [FAILED] qemu: uncaught target signal 4 (Illegal instruction) - core dumped
我的 Dockerfile 看起来像这样:
FROM cypress/browsers:node14.16.0-chrome90-ff88

# Copy the project into the Docker container
COPY . /

# Install the API and UI packages
RUN yarn workspace checkin-api install
RUN yarn workspace checkin-ui install

# Run the e2e test suite
CMD yarn run e2e
奇怪的是,如果我尝试为镜像指定平台,Docker 会提示在本地找不到镜像:
docker run --platform linux/arm64/v8 dna:local
给我以下信息:
Unable to find image 'dna:local' locally
docker: Error response from daemon: pull access denied for dna, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
我假设从 Cypress Docker 存储库中提取的图像决定了所使用的架构,而不是我的 --platform 标志?如果是这样,是否只是 Cypress 不会在我机器上的 Docker 容器中运行的情况?

最佳答案

看起来 Cypress 的 Docker 容器存在一个已知问题,无法与 M1 芯片一起正常工作:
https://github.com/cypress-io/cypress-docker-images/issues/431

关于由于 M1 芯片上的 Qemu 错误,Docker/Cypress 容器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68500448/

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