I had created a Dockerfile for node js project with nginx(without docker-compose.yml) Actually I have to run it on gcp, so, I don't need that file. I have to run the project through dockerfile only
FROM node:16 as nodework
WORKDIR /auto-notification
COPY package*.json ./
RUN npm install
COPY . .
#EXPOSE 8080
CMD ["npx","nodemon"]
#nginx block
FROM nginx:1.23-alpine
WORKDIR /user/nginx
RUN rm -rf ./*
COPY --from=nodework /auto-notification .
#EXPOSE 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]
When I am going to up it on gcp I am getting the error
ERROR: (gcloud.run.services.update) The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information.