无法通过 docker 运行 Laravel sail “错误:服务‘laravel.test’构建失败:构建失败”

无法通过 docker 运行 Laravel sail “错误:服务‘laravel.test’构建失败:构建失败”

我正在尝试在 Windows 10 上通过 docker 安装 laravel sail。我做了一段录像显示我的问题。

nischintpal@mangalyaan:~/test$ ./vendor/bin/sail up
Building laravel.test
[+] Building 258.4s (9/17)
 => [internal] load build definition from Dockerfile                                                                                                                     0.2s
 => => transferring dockerfile: 38B                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                        0.1s
 => => transferring context: 2B                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                                          4.6s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                            0.0s
 => [ 1/12] FROM docker.io/library/ubuntu:20.04@sha256:adf73ca014822ad8237623d388cedf4d5346aa72c270c5acc01431cc93e18e2d                                                  0.0s
 => [internal] load build context                                                                                                                                        0.0s
 => => transferring context: 99B                                                                                                                                         0.0s
 => CACHED [ 2/12] WORKDIR /var/www/html                                                                                                                                 0.0s
 => CACHED [ 3/12] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone                                                                        0.0s
 => ERROR [ 4/12] RUN apt-get update     && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2     &&  253.5s
------
 > [ 4/12] RUN apt-get update     && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2     && mkdir -p ~/.gnupg     && chmod 600 ~/.gnupg     && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf     && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C     && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C     && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list     && apt-get update     && apt-get install -y php8.0-cli php8.0-dev        php8.0-pgsql php8.0-sqlite3 php8.0-gd        php8.0-curl php8.0-memcached        php8.0-imap php8.0-mysql php8.0-mbstring        php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap        php8.0-intl php8.0-readline        php8.0-msgpack php8.0-igbinary php8.0-ldap        php8.0-redis     && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_15.x | bash -     && apt-get install -y nodejs     && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -     && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list     && apt-get update     && apt-get install -y yarn     && apt-get install -y mysql-client     && apt-get install -y postgresql-client     && apt-get -y autoremove     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*: 
..........

写了很多文字,最后我得到了这个:

#8 247.7 Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.8) ...
#8 247.7 Setting up libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.5) ...
#8 247.7 Setting up dirmngr (2.2.19-3ubuntu2.1) ...
#8 248.7 Setting up git (1:2.25.1-1ubuntu3.1) ...
#8 248.7 Setting up libcurl4:amd64 (7.68.0-1ubuntu2.5) ...
#8 248.8 Setting up curl (7.68.0-1ubuntu2.5) ...
#8 248.8 Setting up gpg-wks-client (2.2.19-3ubuntu2.1) ...
#8 248.8 Setting up gnupg (2.2.19-3ubuntu2.1) ...
#8 248.9 Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
#8 249.5 Processing triggers for ca-certificates (20210119~20.04.1) ...
#8 249.5 Updating certificates in /etc/ssl/certs...
#8 250.6 0 added, 0 removed; done.
#8 250.6 Running hooks in /etc/ca-certificates/update.d...
#8 250.6 done.
#8 250.9 Warning: apt-key output should not be parsed (stdout is not a terminal)
#8 251.0 Executing: /tmp/apt-key-gpghome.BkBmYXGXaH/gpg.1.sh --homedir /root/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C
#8 251.7 gpg: keyserver receive failed: No data
------
executor failed running [/bin/sh -c apt-get update     && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2     && mkdir -p ~/.gnupg     && chmod 600 ~/.gnupg     && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf     && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C     && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C     && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list     && apt-get update     && apt-get install -y php8.0-cli php8.0-dev        php8.0-pgsql php8.0-sqlite3 php8.0-gd        php8.0-curl php8.0-memcached        php8.0-imap php8.0-mysql php8.0-mbstring        php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap        php8.0-intl php8.0-readline        php8.0-msgpack php8.0-igbinary php8.0-ldap        php8.0-redis     && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_15.x | bash -     && apt-get install -y nodejs     && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -     && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list     && apt-get update     && apt-get install -y yarn     && apt-get install -y mysql-client     && apt-get install -y postgresql-client     && apt-get -y autoremove     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 2
ERROR: Service 'laravel.test' failed to build : Build failed

相关内容