Dockerfile – Multiple processes – How to introspect GraphQL schema?

Is there a way to do the following in a Dockerfile?

In process 1 (/api):

  • install dependencies
  • compile
  • start a server (long running process)

In process 2 (/client):

  • install different dependencies
  • run a script that sends an HTTP request to an endpoint that the previous process should be listening on
  • compile

Then, move the compiled assets from /client to /api?

For concreteness, the use case is that we have a GraphQL server and a client, and the client needs to introspect the GraphQL schema in order to compile.

Source: Docker Questions