I got this error message when I try to run my container in Google Cloud Run.
type: Ready
status: 'False'
reason: HealthCheckContainerError
message: |-
Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information.
I already checked the followings but nothing helped to me:
My container is running locally and it's listening on default PORT 8080
with HOST configured as 0.0.0.0
.
My Dockerfile:
FROM node:10
WORKDIR /usr/src/app
ENV PORT 8080
ENV HOST 0.0.0.0
COPY package*.json ./
RUN npm install --only=production
COPY . .
RUN npm run build
CMD npm start
Any idea on why Cloud Run keeps failing to listen on the port?
Project GitHub repo: