[Docker] CentOS httpdのdocument root変更

FROM centos:centos7
ENV APACHE_DOCUMENT_ROOT /var/www/html/ssl/
RUN yum update -y && yum clean all
RUN yum install -y epel-release
RUN yum -y install install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
RUN yum install -y httpd
RUN yum -y install --enablerepo=remi,remi-php74 php php-devel php-mbstring php-pdo php-xml php-gd php-fpm php-mysqlnd php-opcache php-pecl-zip libzip5
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/sites-available/*.conf
COPY . /var/www/html/
EXPOSE 80 443
CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]

$ sudo docker build -t mycentos .
$ sudo docker run -dit –name myapp -p 8080:80 mycentos

あれ、うまくいかんな…