# docker-compose hosts 参数
version: '2'
services:
xxx:
hostname: xxx
container_name: xxx
image: xxx
restart: always
extra_hosts:
- "a.com:1.1.1.1"
version: '2'
services:
xxx:
hostname: xxx
container_name: xxx
image: xxx
restart: always
extra_hosts:
- "a.com:1.1.1.1"