sail: Sail fresh installation is not starting and trhows errors when run sail up

  • Sail Version: 1.0.1
  • Laravel Version: v8.49.2
  • PHP Version: 8.0.8
  • OS: macOS BigSur

Description:

After run sail up it starts to build the containers but stops with the error below:

PS! I already created another sail projects on the same computer and it works, until this one now.

$ sail up -d
Building laravel.test
[+] Building 3.2s (8/15)                                                                                                            
 => [internal] load build definition from Dockerfile                                                                           0.0s
 => => transferring dockerfile: 37B                                                                                            0.0s
 => [internal] load .dockerignore                                                                                              0.0s
 => => transferring context: 2B                                                                                                0.0s
 => [internal] load metadata for docker.io/library/ubuntu:21.04                                                                0.8s
 => [ 1/11] FROM docker.io/library/ubuntu:21.04@sha256:a30456233740024b9d297f5bcaa7439446a97bc59b25cadcdae829c334827945        0.0s
 => [internal] load build context                                                                                              0.0s
 => => transferring context: 99B                                                                                               0.0s
 => CACHED [ 2/11] WORKDIR /var/www/html                                                                                       0.0s
 => CACHED [ 3/11] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone                              0.0s
 => ERROR [ 4/11] RUN apt-get update     && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlit  2.3s
------                                                                                                                            
 > [ 4/11] 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 hirsute 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-pcov        php8.0-msgpack php8.0-igbinary php8.0-ldap        php8.0-redis php8.0-swoole     && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_16.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/*:
#7 0.652 Get:1 http://security.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
#7 0.763 Get:2 http://archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
#7 1.149 Err:1 http://security.ubuntu.com/ubuntu hirsute-security InRelease
#7 1.149   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 1.705 Err:2 http://archive.ubuntu.com/ubuntu hirsute InRelease
#7 1.705   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 1.871 Get:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
#7 1.978 Err:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
#7 1.978   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 2.137 Get:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease [90.7 kB]
#7 2.232 Err:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
#7 2.232   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 2.236 Reading package lists...
#7 2.249 W: GPG error: http://security.ubuntu.com/ubuntu hirsute-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 2.249 E: The repository 'http://security.ubuntu.com/ubuntu hirsute-security InRelease' is not signed.
#7 2.250 W: GPG error: http://archive.ubuntu.com/ubuntu hirsute InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 2.250 E: The repository 'http://archive.ubuntu.com/ubuntu hirsute InRelease' is not signed.
#7 2.250 W: GPG error: http://archive.ubuntu.com/ubuntu hirsute-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 2.250 E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-updates InRelease' is not signed.
#7 2.250 W: GPG error: http://archive.ubuntu.com/ubuntu hirsute-backports InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#7 2.250 E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-backports InRelease' is not signed.
------
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 hirsute 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-pcov        php8.0-msgpack php8.0-igbinary php8.0-ldap        php8.0-redis php8.0-swoole     && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_16.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: 100
ERROR: Service 'laravel.test' failed to build

Steps To Reproduce:

  1. curl -s "https://laravel.build/example-app?with=mariadb,redis" | bash
  2. cd example-app
  3. ./vendor/bin/sail up

Check the issue repo: https://github.com/wemersonrv/sail-issue

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 39 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Update to the latest sail and try again.

Running this command solved this for me:

docker system prune --force

In case anyone run into the same issue, the solution is to update docker to its latest version. The problem’s gone away when I updated docker to version 20.10.6 😃

Update to the latest sail and try again.

how do you update to the latest sail? I just followed the instructions on https://laravel.com/docs/8.x/installation#getting-started-on-macos to start a new project and ran into this exact error… I’d appreciate instructions on how to do this… thank you!

I had the same issue arise earlier today with fresh install on macos. Workaround for me was to go back to a prior release of sail. Not an ideal solution but you can modify composer.json and pin to an older version which worked for me.
“laravel/sail”: “1.7.0” $ sail up --build

Will revisit once this issue is resolved.

was struggling for two days with all solutions above and failed. but now after turning off my vpn its works LOL

none of the above helped in my case 😦 I solved the issue via Upgrading laravel/sail (v1.14.1 => v1.15.1).

macOS Monterey Version 12.3, Docker version 20.10.17.

I had this issue and found updating my docker machine has worked and my sail is now installing!

Same issue here. I’ve tried it both via laravel.build and composer create-project

curl -s https://laravel.build/example-app | bash
cd example-app
./vendor/bin/sail up

and

composer create-project laravel/laravel example-app
cd example-app
php artisan sail:install
./vendor/bin/sail up
Output
Step 8/17 : 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 hirsute 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-pcov        php8.0-msgpack php8.0-igbinary php8.0-ldap        php8.0-redis php8.0-swoole     && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_16.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/*
 ---> Running in 7fd7e572e41d
Get:1 http://archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
Get:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
Err:1 http://archive.ubuntu.com/ubuntu hirsute InRelease
  gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Get:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease [101 kB]
Err:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
  gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
  gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease
  gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Reading package lists...
W: GPG error: http://archive.ubuntu.com/ubuntu hirsute InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu hirsute-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-updates InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu hirsute-backports InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-backports InRelease' is not signed.
W: GPG error: http://security.ubuntu.com/ubuntu hirsute-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://security.ubuntu.com/ubuntu hirsute-security InRelease' is not signed.

I’m on Kubuntu 21.04 Docker version 19.03.13, build 4484c46d9d

@jorgenordonez What Docker version resolved the issue for you?

FYI vendor/bin/sail up can fail initially, but subsequent runs start up without issue. This is because the issue is in the build. If you want to reliably reproduce the issue, you need to issue vendor/bin/sail up --build.

There seem to be various reasons people get into this situation. One thing you can try as suggested above, is to remove docker images/volumes/etc to reclaim space. This is why docker system prune --force or docker system prune -a may work for you.

I had this issue and found updating my docker machine has worked and my sail is now installing!

This is also solved my issues. I went away after upgrading my docker-machine then I was able to build again.

@dinamic This is separate issue, see #596 and possible temporary workaround

Using Docker Desktop 4.21.1 on macOS and this is still a problem.

curl -s https://laravel.build/example-app | bash
cd example-app
./vendor/bin/sail up
61.39 Processing triggers for php8.2-cli (8.2.8-1+ubuntu22.04.1+deb.sury.org+1) ...
61.76 All settings correct for using Composer
61.77 Downloading...
62.73
62.73 Composer (version 2.5.8) successfully installed to: /usr/bin/composer
62.73 Use it: php /usr/bin/composer
62.73
62.92
62.92 ## Installing the NodeSource Node.js 18.x repo...
62.92
62.92
62.92 ## Populating apt-get cache...
62.92
62.92 + apt-get update
63.08 Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
63.12 Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
63.16 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
63.17 Hit:4 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
63.21 Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
63.38 Reading package lists...
63.77
63.77 ## Installing packages required for setup: lsb-release...
63.77
63.77 + apt-get install -y lsb-release > /dev/null 2>&1
64.77
64.77 ## Confirming "jammy" is supported...
64.77
64.77 + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/jammy/Release'
64.89
64.89 ## Adding the NodeSource signing key to your keyring...
64.89
64.89 + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
65.02
65.02 ## Creating apt sources list file for the NodeSource Node.js 18.x repo...
65.02
65.02 + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main' > /etc/apt/sources.list.d/nodesource.list
65.02 + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main' >> /etc/apt/sources.list.d/nodesource.list
65.03
65.03 ## Running `apt-get update` for you...
65.03
65.03 + apt-get update
65.17 Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
65.17 Get:2 https://deb.nodesource.com/node_18.x jammy InRelease [4563 B]
65.21 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
65.26 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
65.26 Hit:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
65.30 Get:6 https://deb.nodesource.com/node_18.x jammy/main arm64 Packages [774 B]
65.31 Hit:7 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
65.50 Fetched 5337 B in 0s (12.2 kB/s)
65.50 Reading package lists...
65.88
65.88 ## Run `sudo apt-get install -y nodejs` to install Node.js 18.x and npm
65.88 ## You may also need development tools to build native addons:
65.88      sudo apt-get install gcc g++ make
65.88 ## To install the Yarn package manager, run:
65.88      curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
65.88      echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
65.88      sudo apt-get update && sudo apt-get install yarn
65.88
65.88
65.90 Reading package lists...
66.28 Building dependency tree...
66.37 Reading state information...
66.46 The following NEW packages will be installed:
66.46   nodejs
66.56 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
66.56 Need to get 28.1 MB of archives.
66.56 After this operation, 188 MB of additional disk space will be used.
66.56 Get:1 https://deb.nodesource.com/node_18.x jammy/main arm64 nodejs arm64 18.17.0-deb-1nodesource1 [28.1 MB]
68.64 debconf: delaying package configuration, since apt-utils is not installed
68.65 Fetched 28.1 MB in 2s (13.7 MB/s)
68.67 Selecting previously unselected package nodejs.
(Reading database ... 24343 files and directories currently installed.)
68.68 Preparing to unpack .../nodejs_18.17.0-deb-1nodesource1_arm64.deb ...
68.68 Unpacking nodejs (18.17.0-deb-1nodesource1) ...
70.61 Setting up nodejs (18.17.0-deb-1nodesource1) ...
70.61 Processing triggers for man-db (2.10.2-1) ...
72.18
72.18 removed 16 packages, and changed 42 packages in 1s
72.18
72.18 28 packages are looking for funding
72.18   run `npm fund` for details
72.26 curl: (60) SSL: no alternative certificate subject name matches target host name 'dl.yarnpkg.com'
72.26 More details here: https://curl.se/docs/sslcerts.html
72.26
72.26 curl failed to verify the legitimacy of the server and therefore could not
72.26 establish a secure connection to it. To learn more about this situation and
72.26 how to fix it, please visit the web page mentioned above.
72.26 gpg: no valid OpenPGP data found.
72.63 Get:1 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
72.66 Hit:2 https://deb.nodesource.com/node_18.x jammy InRelease
72.67 Get:3 http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease [123 kB]
72.67 Err:1 https://dl.yarnpkg.com/debian stable InRelease
72.67   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
72.67 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
72.72 Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
72.77 Hit:6 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
72.80 Hit:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
72.81 Hit:8 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
72.98 Get:9 http://apt.postgresql.org/pub/repos/apt jammy-pgdg/main arm64 Packages [438 kB]
73.12 Reading package lists...
73.50 W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
73.50 E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
------
failed to solve: process "/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 dnsutils librsvg2-bin     && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main\" > /etc/apt/sources.list.d/ppa_ondrej_php.list     && apt-get update     && apt-get install -y php8.2-cli php8.2-dev        php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick        php8.2-curl        php8.2-imap php8.2-mysql php8.2-mbstring        php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap        php8.2-intl php8.2-readline        php8.2-ldap        php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole        php8.2-memcached php8.2-pcov php8.2-xdebug     && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -     && apt-get install -y nodejs     && npm install -g npm     && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main\" > /etc/apt/sources.list.d/yarn.list     && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main\" > /etc/apt/sources.list.d/pgdg.list     && apt-get update     && apt-get install -y yarn     && apt-get install -y mysql-client     && apt-get install -y postgresql-client-$POSTGRES_VERSION     && apt-get -y autoremove     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 100

Any ideas on how to resolve this?

@makebettertechtoday It came back for you maybe it would do the same for me. I need to see if I have the same effect. Haven’t been on my Laravel project for some time.

@reaves-tyler sail up ran successfully…meaning it worked for you?

@jorgenordonez Ah, apparently the docker apt repository got removed when upgrading Kubuntu which is why apt no longer upgraded my Docker version. It’s fixed now. Thanks!