Change repo from EPEL to Red Hat Software Collections

For nginx, php, and its extensions
This commit is contained in:
Adam W Zheng
2019-03-12 11:17:25 -05:00
parent aa0cbc18c0
commit db16db4e32
+4 -6
View File
@@ -10,12 +10,10 @@ RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / --exclude="./bin" \
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C /usr ./bin
#Install SimpleSAMLphp Requirements
RUN yum -y install epel-release \
&& rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm \
&& echo -e '[nginx]\nname=nginx repo\nbaseurl=http://nginx.org/packages/centos/7/$basearch/\ngpgcheck=0\nenabled=1' > /etc/yum.repos.d/nginx.repo \
&& yum -y install nginx php56u-fpm php56u-fpm-nginx php56u-dom php56u-mbstring php56u-pdo php56u-pecl-memcache php56u-ldap sendmail \
&& sed -i 's/user = apache/user = nginx/' /etc/php-fpm.d/www.conf \
&& sed -i 's/group = apache/group = nginx/' /etc/php-fpm.d/www.conf
RUN yum -y install centos-release-scl \
&& yum -y install nginx rh-php72 rh-php72-php-fpm rh-php72-php-mbstring rh-php72-php-pdo php-pecl-memcache rh-php72-php-ldap \
&& sed -i 's/user = apache/user = nginx/' /etc/opt/rh/rh-php72/php-fpm.d/www.conf \
&& sed -i 's/group = apache/group = nginx/' /etc/opt/rh/rh-php72/php-fpm.d/www.conf
#Configure webserver
RUN echo -e 'server {\n listen 80 default_server;\n listen [::]:80 default_server;\n server_name _;\n root /var/simplesamlphp/www/;\n index index.php;\n\n location /simplesaml {\n alias /var/simplesamlphp/www/;\n location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?.php)(?<pathinfo>/.*)?$ {\n include fastcgi_params;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_split_path_info ^(.+?.php)(/.+)$;\n fastcgi_param SCRIPT_FILENAME $document_root$phpfile;\n fastcgi_param PATH_INFO $pathinfo if_not_empty;\n }\n }\n\n location ~ .php$ {\n fastcgi_split_path_info ^(.+.php)(/.+)$;\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n include fastcgi_params;\n add_header Cache-control no-cache;\n }\n}' > /etc/nginx/conf.d/default.conf \