Dockerfile:
FROM nginx:alpine
# Remove the default Nginx configuration
RUN rm /etc/nginx/conf.d/default.conf
# Copy the script or static files required for your application
COPY quickstart.sh /usr/share/nginx/html/
# Set the working directory
WORKDIR /usr/share/nginx/html/
# Expose the default Nginx port (optional)
EXPOSE 8080
# Start Nginx when the container starts
CMD ["nginx", "-g", "daemon off;"]
Cloud Shell command:
gcloud run deploy michael-testing-mk2 --source .
Output:
Revision 'michael-testing-mk2-00002-cus' is not ready and cannot serve traffic. The user-provided container failed to start and li
sten on the port defined provided by the PORT=8080 environment variable.
@midacanay wrote:# Expose the default Nginx port (optional) EXPOSE 8080
Try removing that and change cloud run port configuration from 8080 to 80 and re-deploy it should work.
I hope that helps