4

I'm trying to setup the dev environment for an existing project on another computer under WSL2 and Windows 10. Having installed the project from its own repo with composer install and making sure a basic .env file is in place, I ran /vendor/bin/sail up to do the initial build.

Docker starts normally, but then during stage 4 of 11 RUN apt-get update && apt-get install...., it just halts when it gets to the line gpg: keybox '/root/.gnupg/pubring.kbx' created the build halts, the clock is still ticking but the operation never finishes.

I'm able to hit Ctrl + C and it Cancels cleanly.

Editing Laravel's dockerfile, I added a -v to the gpg --recv-key ... line in the script and got additional output with the operation halting after gpg: connection to dirmngr established instead.

I'm running Ubuntu under WSL2, fully updated, docker freshly installed and configured to talk to it as on my other machine where I'm not having any issues.

Nidonocu
  • 12,476
  • 7
  • 42
  • 43
  • 1
    There's a PR that has been accepted that fixes this issue, so this shouldn't be an issue for long. https://github.com/laravel/sail/pull/508 – Kerwin Sneijders Dec 16 '22 at 12:58

1 Answers1

14

Removing the portnumber (:80) for the keyserver from the PHP 8.x docker file seems to be a workaround for this problem.

 echo "keyserver hkp://keyserver.ubuntu.com" >> ~/.gnupg/dirmngr.conf \

Tested with PHP 8.1.

Source: https://github.com/laravel/sail/issues/503#issuecomment-1336273951

witti
  • 151
  • 3