gpt4 book ai didi

docker - 尝试使用 docker-compose 构建 Docker 镜像时出现 "Unable to find a match Error"

转载 作者:行者123 更新时间:2023-12-02 18:35:25 27 4
gpt4 key购买 nike

我正在尝试构建一个包含 Nginx Web 服务器和 PHP 的 docker 镜像。

我正在使用带有 centos 7 的虚拟机

这是我的 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

这是错误输出:

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

最佳答案

看起来 epel-release 包丢失了。

确保 CentOS Extras 存储库包含用于安装 EPEL 的软件包

你可以用下面的命令检查

yum search epel-release
yum info epel-release

关于docker - 尝试使用 docker-compose 构建 Docker 镜像时出现 "Unable to find a match Error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59221520/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com