Open
Description
I'm working on building a project to be hosted in Google App Engine with a custom runtime (ie., docker container) based on phppm/docker. However, GAE requires that custom runtimes listen on port 8080:
From the GAE documentation:
Listen to port 8080
The App Engine front end will route incoming requests to the appropriate module on port 8080. You must be sure that your application code is listening on 8080.
It would be nice if the ultimate end port the docker images listened on was configurable from the Dockerfile in our custom container. Perhaps something like this:
FROM phppm/nginx
ENV PPM_LISTEN_ON 8080
COPY web/ /var/www
and then have the PHPPM docker container we are extending automatically configure itself to listen on that port we've set.
Activity
marcj commentedon Aug 3, 2018
Why can't you just proxy 8080 to 80? it's actually pretty common to let the service run on the port in the docker container they naturally have. I'd not like to attach that now to one service in the wild, namely GAE.
brianV commentedon Aug 3, 2018
Hi Marc,
Maybe I am misunderstanding your question, but I am not sure how you would proxy the ports.
GAE builds the image based on the Dockerfile and deploys it internally. They then route all requests to port 8080 of deployed container, as per the documentation linked / quoted in the OP. So, in order to work at all on GAE, the Dockerfile needs to be configured in such a way that the resulting image will listen on 8080.
marcj commentedon Aug 3, 2018
I see, I thought there must be a way to configure this in GAE, however, then we should make it configurable in someway, but I'd not make it the default.