Containerizing the Apollo Router
More details about Apollo Router images are available on GitHub.
Each release of the Apollo Router includes both default and debug images. Each image for a release contains the same build. Debug images additionally contain a "busybox" to help with container debugging.
Note: The Apollo Router is made available under the Elastic License v2.0 (ELv2). This applies to its source code and all distributions. For details, see our licensing page.
Here's a basic example of running a router image with Docker (make sure to replace
<image version> with whichever version you want to use, such as
docker run -p 4000:4000 \--env APOLLO_GRAPH_REF="<your graph>" \--env APOLLO_KEY="<your key>" \--rm \ghcr.io/apollographql/router:<image version>
This command downloads your supergraph schema from Apollo and uses a default configuration that listens for connections on port
For more complex configuration (such as overriding subgraph URLs or propagating headers), see Configuring the Apollo Router.
- The router executable is located in the
- A default configuration file,
router.yaml, is located in the
- There is also a
/dist/schemadirectory for convenient mounting of a locally defined supergraph schema.
- Licensing details are also available in the
Apollo Router images are based on distroless, which is designed to provide constrained, secure, and small images.