Hi John,
Thank you for the interesting question.
You may build a custom runtime to your liking, and deploy it, if it satisfies a set of conditions that define a performance minimum. Your custom runtime needs to comply to the following and contain:
- An app.yaml file that describes your application's runtime configuration.
- A Dockerfile that configures the runtime environment. In many cases, this can be just one line specifying a base image.
- You need to ensure your application is listening on port 8080 and has request handlers that respond to lifecycle events, such as start, stop, and health check requests.
In fact, there is no imperative requirement that you have to use the base images supplied by Google, only that your Docker image satisfies the above minimum requirements.
Hoping the above covers your initial concern; you are welcome to ask more in-depth questions.
Hello John,
You are right, your second option applies: in almost all cases, you should only run a single process in a single container. The CMD instruction should be used to run the software contained by your image.
If services are to be available concurrently, you may consider building a group of containers in a pod. Using Kubernetes may come in handy here.
Hello John,
You are right, the custom environment is aware of values set by means of the app.yaml, as described here.
You may use Kubernetes to manage and deploy your containers in the flexible environment as well, and set the env_variables values to manage your instance’s environment via global variables.