start-apache.sh 465 B

1234567891011
  1. #!/usr/bin/env bash
  2. docker rm -f apache 2>/dev/null > /dev/null
  3. docker run -d --name apache -v $2:/var/www/html -v /tmp/shared:/shared --dns $1 --hostname httpd.domain.test icewind1991/samba-krb-test-apache 1>&2
  4. APACHE_IP=$(docker inspect apache --format '{{.NetworkSettings.IPAddress}}')
  5. # add the dns record for apache
  6. docker exec dc samba-tool dns add krb.domain.test domain.test httpd A $APACHE_IP -U administrator --password=passwOrd1 1>&2
  7. echo $APACHE_IP