嘿,所有StackOverflow的人!我有一个关于docker-compose的问题。
我已经在注册表中创建了自定义映像,我希望将其与公共注册表中的另一个映像相连接。在我的例子中,这将是Cypress和我的一个运行构建过程的应用程序。
本质上,我想将文件共享给这个Cypress,然后运行相同的测试。
因此,它应该首先运行yarn start-server,然后在->完成后运行cypress测试。我环顾四周,找不到任何关于这方面的文章。
这是我试图设置的代码片段:
version: "3.4"
services:
e2e:
build: .
container_name: cypress
image: cypress/included:6.2.0
volumes:
- static-content:/e2e
depends_on:
- front
front:
build: .
command: ["yarn start-server"]
container_name: front
image: myinternalimage
restart: unless-stopped
volumes:
- static-content:/src
- static-content:/cypress
- static-content:/cypress.json
ports:
- "3000:3000"
container_name: frontend
volumes:
static-content:
driver: local如果有任何帮助,我将不胜感激。提前感谢!
发布于 2021-04-15 20:05:55
https://stackoverflow.com/questions/67097717
复制相似问题