skip to Main Content

I am trying to build a docker image containing Nginx Web Server and PHP.

I am using a VM with centos 7

This is my Dockerfile

FROM remote-host

COPY ./conf/nginx.repo /etc/yum.repos.d/nginx.repo

RUN yum -y update && 
    yum install -y epel-release && 
    yum -y install nginx openssl --enablerepo=nginx && 
    yum -y update &&  
    yum -y install https://centos7.iuscommunity.org/ius-release.rpm --nobest --skip-broken && 
    yum -y install php71u-fpm php71u-cli && 
    yum clean all

EXPOSE 80 443

VOLUME /var/www/html /var/log/nginx /var/log/php-fpm /var/lib/php-fpm

COPY ./conf/nginx.conf /etc/nginx/conf.d/default.conf

COPY ./bin/start.sh /start.sh

RUN chmod +x /start.sh

CMD /start.sh

This is the error output :

Problem: conflicting requests
  - nothing provides epel-release = 7 needed by ius-release-2-1.el7.ius.noarch
================================================================================
Skip  1 Package

Nothing to do.
Complete!
Last metadata expiration check: 0:00:22 ago on Fri Dec  6 23:07:40 2019.
**No match for argument: php71u-fpm
No match for argument: php71u-cli
Error: Unable to find a match**
ERROR: Service 'web' failed to build: The command '/bin/sh -c yum -y update &&     yum install -y epel-release &&     yum -y install nginx openssl --enablerepo=nginx &&     yum -y update &&      yum -y install https://centos7.iuscommunity.org/ius-release.rpm --nobest --skip-broken &&     yum -y install php71u-fpm php71u-cli &&     yum clean all' returned a non-zero code: 1

2

Answers


  1. Looks like epel-release package is missing.

    Make sure CentOS Extras repository includes a package to install EPEL

    You can check with below comands

    yum search epel-release
    yum info epel-release
    
    Login or Signup to reply.
  2. the package family php71u is deprecated but can be downloaded by setting the repo to be "ius-archive" instead of "ius-release". like wise:

    yum --enablerepo=ius-archive install php71u-fpm
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search