简体   繁体   中英

Docker invalid reference format error when installing laravel sail

I am trying to install a new Laravel project using the code provided in the official Laravel documentation

curl -s "https://laravel.build/example-app" | bash

However, I keep receiving this error:

docker: invalid reference format.
See 'docker run --help'.
bash: line 16: cd: example-app: No such file or directory

I have tried both resetting my Docker application to default factory settings and uninstalling and reinstalling it, but the error keeps reappearing. What makes it even weirder, roughly a month ago I was doing the same thing when first experimenting with Laravel and Docker and everything was working fine. Does anybody know what could be the case?

if you are working with Windows Subsystem Linux (WSL), try executing bash , because it seems like your device doesnt recognize the docker container.

if that doesnt work, check if php, composer and docker are installed correctly, and if you have downloaded and configured a distro such as Ubuntu.

If the issue still is not fixed, execute wsl --setdefault -(NAMEOFDISTRO) in the terminal.

I ran into this same issue a couple of weeks ago and fixed it by using combinations of the solutions above.

I hope this helped!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM