title: Google Cloud Run fails to listen even after changing port to 8080
body: <p>I am having some issues deploying to Cloud Run lately. When I am trying to deploy the below Dockerfile to Cloud Run, it ends up with the error <strong>Failed to start and then listen on the port defined by the PORT environment variable.</strong>:</p>
  
  <pre><code>FROM phpmyadmin/phpmyadmin:latest
  
  EXPOSE 8080
  
  RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
  
  ENTRYPOINT [ "/docker-entrypoint.sh" ]
  
  CMD [ "apache2-foreground" ]
  </code></pre>
  
  <p>The ENTRYPOINT and CMD were added separately even though the <strong>phpmyadmin/phpmyadmin:latest</strong> uses this same ENTRYPOINT and CMD to see if that would solve it, though it is not required. The same Docker image when deployed using <strong>docker run</strong> runs properly and listens on port 8080. Is there something I am doing wrong?</p>
  
  <p>This is the command I use to deploy:</p>
  
  <pre><code>gcloud run deploy phpmyadmin --memory=1Gi --platform=managed \
  --allow-unauthenticated --add-cloudsql-instances project_id:us-central1:db-name \ 
  --region=us-central1 --image gcr.io/project_id/phpmyadmin:1.3 \
  --update-env-vars PMA_HOST=localhost,PMA_SOCKET="/cloudsql/project_id:us-central1:db-name",PMA_ABSOLUTE_URI=phpmyadmin.domain.com
  </code></pre>
  
  <p>This is all I can find in the logs. (Have redacted some data):</p>
  
  <p><a href="https://gist.github.com/shanukk27/9dd4b3076c55307bd6e853a76e7a34e0" rel="nofollow noreferrer">https://gist.github.com/shanukk27/9dd4b3076c55307bd6e853a76e7a34e0</a></p>