【问题标题】:failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed无法使用前端 dockerfile.v0 解决:无法构建 LLB:执行程序失败
【发布时间】:2022-03-06 07:03:15
【问题描述】:

我的 Dockerfile

FROM centos:7

# Install Apache
RUN yum -y update
RUN yum -y install httpd httpd-tools

# Install EPEL Repo
RUN yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

# Install PHP
RUN yum install yum-utils
RUN yum-config-manager --enable remi-php73

RUN yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

# Update Apache Configuration
RUN sed -E -i -e '/<Directory "\/var\/www\/html">/,/<\/Directory>/s/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf
RUN sed -E -i -e 's/DirectoryIndex (.*)$/DirectoryIndex index.php \1/g' /etc/httpd/conf/httpd.conf

EXPOSE 80

# Start Apache
CMD ["/usr/sbin/httpd","-D","FOREGROUND"]

当我想构建这个图像时,我得到了

failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm]: runc did not terminate successfully

如何用 centos apache 和 PHP 73 构建 docker 镜像?

【问题讨论】:

  • 尝试增加 docker 的 RAM 并增加 CPU 的数量

标签: docker


【解决方案1】:

去掉三行

# Install EPEL Repo
RUN yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

那些命令不存在,我怀疑你试图复制dnf 的指令并将dnf 替换为yum,这是行不通的。 反正你不需要这些。

如果你确实需要它们,你可以试试

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

或许

RUN yum -y update; \
    yum install -y epel-release; \
    rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

【讨论】:

    猜你喜欢
    • 2021-02-28
    • 2023-01-03
    • 2021-01-21
    • 1970-01-01
    • 1970-01-01
    • 2021-10-29
    • 1970-01-01
    • 2021-09-08
    • 2021-05-08
    相关资源
    最近更新 更多