sail: Ubuntu container doesn't build.
- Sail Version: #.#.# 1.12.7
- Laravel Version: #.#.# v8.73.2
- PHP Version: #.#.# 8.0.13
- OS: Windows / Linux / macOS #.#.# Ubuntu 20.04
Description:
Can’t run Sail. Building the ubuntu container fails with this error:
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.
Full log:
Step 9/18 : 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.1-cli php8.1-dev php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL 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 | 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 39da3a725f7b
Get:1 http://archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [115 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.
ERROR: Service 'laravel.test' failed to build : The command '/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.1-cli php8.1-dev php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL 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 | 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/*' returned a non-zero code: 100
Steps To Reproduce:
laravel new app composer require laravel/sail --dev php artisan sail:install (select pgsql) ./vendor/bin/sail up
done
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 46 (8 by maintainers)
I think the solution here is pretty clear:
a) Update Composer; b) If you have copied the Dockerfile then it needs to be updated
I believe this issue should be locked now.
Updating Sail via
composer updatefixed the issue for meUpdate
Turning off Private Relay in iCloud settings solved the issue for me!
Same issue here.
Everything was working fine with 8.0 but I get the same error now that i’m trying 8.1
docker-compose v2.1.1 laravel/framework v8.73.2 laravel/sail v1.12.8
docker-compose.yml
Error log
I modified the following
/vendor/laravel/sail/runtimes/8.1/Dockerfileas follows and made it work. I know it’s bad to modify this file manually. Please also understand that using this is an emergency evacuation action. @taylorotwellSwitch
context: ./vendor/laravel/sail/runtimes/8.1tocontext: ./vendor/laravel/sail/runtimes/8.0and runsail build --no-cacheand try again please.Having the same problem. I tried with brand new application, I still got the same error
I have a brand new Laravel app on a Mac but have not been able to run Sail or get past this error:
Things I’ve tried:
composer update(I’m on composer version 2.5.8)php artisan sail:publishand modifying the apt-get command within the Dockerfile to includeapt-get clean && apt-get update --fix-missing./vendor/bin/sail build --no-cacheHowever the issue
The following signatures couldn't be verified because the public key is not availablepersists. Any ideas about where it is coming from or what I can do to get up and running with Sail?Had the same problem, after I’ve tried out all the fixes listed above,
composer updateis what fixed it for me.The real issue here for the PHP packages is that Ondrej only has packages for the current release of ubuntu and LTS releases, so 21.04 not being current does not have packages in that PPA. The sail docker files should be updated to be based on the current Ubuntu images.
For anyone struggling i managed to solve teh issue by running
apt-get cleanfirst. For example:Also having the same issue. I’m on Sail v1.23.1
It fixes my issue too
You should NEVER edit files in
vendordirectory. Runphp artisan sail:publishand edit published files in./docker/[php-version]/DockerfileWhere do you put this code, in docker-compose.yml? I’m very new to Sail/Docker/ubuntu and having the same problem.
To whom is having this problem when trying to install php dependencies, the problem for me was:
FROM ubuntu:21.04Because there are no php 8.1 binaries for Ubuntu 21.04. http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php8.1/ Changing to this solved the issue:
FROM ubuntu:21.10In my case i need to change the apt-key
to
In the Dockerfile
For me, the opposite worked. Turning the Private Relay to ON actually fixed the problem! 🤯