named.service.j2 510 B

123456789101112131415
  1. [Unit]
  2. Requires=docker.service
  3. After=docker.service
  4. PartOf=docker.service
  5. [Service]
  6. Type=simple
  7. TimeoutStartSec=5m
  8. ExecStartPre=/usr/bin/docker run --rm -v /etc/named.conf:/etc/named.conf -v /var/named:/var/named:z bind named-checkconf -z /etc/named.conf
  9. ExecStartPre=-/usr/bin/docker rm -f bind
  10. ExecStart=/usr/bin/docker run --name bind -p 53:53/udp -v /var/log:/var/log -v /etc/named.conf:/etc/named.conf -v /var/named:/var/named:z bind
  11. ExecStop=/usr/bin/docker stop bind
  12. [Install]
  13. WantedBy=docker.service