Created
August 31, 2016 20:12
-
-
Save programmerq/56681c0ed26f53ef1fc1fb9cbc2ced41 to your computer and use it in GitHub Desktop.
extra_hosts example
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: "2" | |
services: | |
eh: | |
image: alpine | |
command: cat /etc/hosts | |
extra_hosts: | |
- "foo.com:1.2.3.4" |
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
$ docker-compose up | grep foo.com | |
Starting eh_eh_1 | |
eh_1 | 1.2.3.4 foo.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment