Last active
August 22, 2019 09:36
-
-
Save nealeu/8c8e68aaa7355dcd0dd2930eee44e8e7 to your computer and use it in GitHub Desktop.
Fake metdata.google.internal for GCP images with docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
metadata0: | |
image: nginx:alpine | |
volumes: | |
- ./metadata-db0:/usr/share/nginx/html:ro | |
command: [nginx-debug, '-g', 'daemon off;'] | |
db0: | |
links: | |
- metadata0:metadata.google.internal | |
image: gcr.io/some-project/some_gcp_image:v1 | |
metadata1: | |
image: nginx:alpine | |
volumes: | |
- ./metadata-db1:/usr/share/nginx/html:ro | |
command: [nginx-debug, '-g', 'daemon off;'] | |
db1: | |
links: | |
- metadata1:metadata.google.internal | |
image: gcr.io/some-project/some_gcp_image:v1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes you might want to spin up a few containers that are GCP aware and pull their config from metadata.google.internal.
This should be sufficient to get a static setup, but perhaps there are better ways that work with docker-compose scaling for example.