Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Failed: c56eb8db-29fb-46fb-93e6-6a27212f0f82

i am getting the following error:
rajeshdevops_0-1701774509213.png

 

 
 
 
 
#cloudbuild yaml file for sales-dashboard
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '-t', 'gcr.io/  invoice-362011/sales-dashboard-image', '.']
# Push the container image to the Container Registry
- name: 'gcr.io/cloud-builders/docker'
  args: ['push', 'gcr.io/invoice-362011/sales-dashboard-image']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
  entrypoint: gcloud
  args: ['run', 'deploy', 'dashboard', '--image', 'gcr.io/  invoice-362011/sales-dashboard-image', '--region', 'asia-south1']

images:
- gcr.io/ invoice-362011/sales-dashboard-image
options:
  logging: CLOUD_LOGGING_ONLY
Solved Solved
0 3 340
1 ACCEPTED SOLUTION

Hi Christian Paula,
Thanks for the reply. Please check the following details.
when I deploy the app manually to the cloud run service,  it can create the revision and route the traffic(not getting any port issues).
But when I use a cloud build for deploying, I get the port issue. please docker file, cloud build file, and error message also.
Docker File:

FROM node:18-slim

WORKDIR /app

COPY package*.json ./

RUN npm install --global --unsafe-perm sequelize-cli

RUN npm install --production

COPY . ./

EXPOSE 8000

CMD [ "npm","start" ]

Cloud Build.yaml:

#cloudbuild yaml file for saudi-evhc-dev-cloud-run-service

steps:

  - name: 'gcr.io/cloud-builders/docker'

    args: ['build', '-t', 'gcr.io/invoice-362011/evhc-saudi-dev', '.']

 

  - name: 'gcr.io/cloud-builders/docker'

    args: ['push', 'gcr.io/invoice-362011/evhc-saudi-dev']

 

  - name: 'gcr.io/cloud-builders/gcloud'

    args:

      - 'run'

      - 'deploy'

      - 'saudi-evhc-dev' # cloud run service name

      - '--image=gcr.io/invoice-362011/evhc-saudi-dev'

      - '--platform=managed'

      - '--region=asia-south1'

      - '--port=8000'

options:

  logging: 'CLOUD_LOGGING_ONLY'

rajeshdevops_0-1701934419466.pngrajeshdevops_1-1701934444068.pngrajeshdevops_2-1701934465669.png

 

 

 
 
 
 

View solution in original post

3 REPLIES 3