-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
44 lines (40 loc) · 1.24 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '2'
# Default network is an external network created by the user.
# Projects add vhost containers to this network.
networks:
default:
external:
name: auto
services:
# The nginx proxy that autoconfigures itself with vhosts for containers that
# have the `VIRTUAL_HOST` environment variable set.
# https://hub.docker.com/r/jwilder/nginx-proxy/
nginx:
image: jwilder/nginx-proxy:alpine
container_name: auto-nginx
# Publish the HTTP port on the host.
ports:
- '80:80'
# Needs the Docker socket to inspect other containers.
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
# Keep running through restarts.
restart: always
# The dnsmasq instance that responds to all requests for the `test`
# top-level domain with `127.0.0.1`, which is the nginx proxy.
# https://hub.docker.com/r/andyshinn/dnsmasq/
dnsmasq:
image: andyshinn/dnsmasq
container_name: auto-dnsmasq
command:
- '--address=/test/127.0.0.1'
- '--server=8.8.8.8' # Forward to Google DNS.
# Dnsmasq needs this capability.
cap_add:
- NET_ADMIN
# Publish the DNS ports on the host.
ports:
- '53:53'
- '53:53/udp'
# Keep running through restarts.
restart: always