Created
October 14, 2020 09:48
-
-
Save sempr/83786fa618cf9d107228bbad98908e1d to your computer and use it in GitHub Desktop.
docker-compose, extend
This file contains 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.8" | |
x-superenv: | |
&default-superenv | |
environment: | |
XX: 135 | |
FOO: superenv-foo | |
command: echo $${XX} $${FOO} | |
services: | |
echo: &echo-base | |
container_name: echo | |
image: alpine:latest | |
restart: always | |
command: | |
- sh | |
- -c | |
- echo $$XX && tail -F /xxx.log | |
environment: | |
XX: 123 | |
echo2: | |
<<: *echo-base | |
container_name: echo2 | |
environment: | |
XX: 456 | |
echo3: | |
<<: *echo-base | |
container_name: echo3 | |
environment: | |
XX: 789 | |
run1: | |
<<: *default-superenv | |
image: alpine:latest | |
run2: | |
<<: *default-superenv | |
image: alpine:latest | |
command: | |
- sh | |
- -c | |
- echo $$FOO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment