Skip to content

Instantly share code, notes, and snippets.

@programmerq
Created August 31, 2016 20:12
Show Gist options
  • Save programmerq/56681c0ed26f53ef1fc1fb9cbc2ced41 to your computer and use it in GitHub Desktop.
Save programmerq/56681c0ed26f53ef1fc1fb9cbc2ced41 to your computer and use it in GitHub Desktop.
extra_hosts example
version: "2"
services:
eh:
image: alpine
command: cat /etc/hosts
extra_hosts:
- "foo.com:1.2.3.4"
$ 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