[英]Cloud Run error: Container failed to start. Failed to start and then listen on the port
[英]Cypress: Container failed to start. Failed to start and then listen on the port defined by the PORT
我正在嘗試使用雲構建部署我的柏樹測試,但是,我在雲構建中不斷收到以下錯誤。
Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable
我不確定我做錯了什么。
這是我的 docker 文件
FROM cypress/browsers:node13.8.0-chrome81-ff75
WORKDIR /root
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npm", "run", "cy:run:chrome"]
這是我的cloudbuild.yaml
steps:
# Build image
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'gcr.io/app-trick/cypress-tests', './']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/app-trick/cypress-tests']
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'run'
- 'deploy'
- 'cypress-tests'
- '--image'
- 'gcr.io/app-trick/cypress-tests'
- '--region'
- 'us-east4'
- '--platform'
- 'managed'
- '--allow-unauthenticated'
這是我的 package.json
{
"name": "cypress_nid",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"cy:open": "npx cypress open --port $PORT",
"cy:run": "npx cypress run --port $PORT",
"cy:run:chrome": "npx cypress run --browser chrome --port $PORT",
"cy:run:firefox": "npx cypress run --browser firefox --port $PORT",
"cy:run:record": "npx cypress run --record --port $PORT"
},
"author": "",
"license": "ISC",
"devDependencies": {
"cypress": "^4.11.0",
"cypress-promise": "^1.1.0"
},
"dependencies": {
"D": "^1.0.0",
"express": "^4.17.1"
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.