# Version 2 is the latest that is supported by docker-compose in # Ubuntu Xenial. version: '2' services: haproxy: restart: always image: haproxy:latest network_mode: host volumes: - /var/haproxy/etc:/usr/local/etc/haproxy - /var/haproxy/run:/var/haproxy/run