我的只是少了ubuntu这个选项。 在查看微软官方文档, 看到以下内容将分发版版本设置为 WSL 1 或 WSL 2, 下面是我操作的截图: 重新打开 docker: 完美手工,继续看文档,搭建环境!!!
根目录下创建docker目录,并将 vendor/laravel/sail/runtimes 目录下的文件及目录复制过来; 更新docker-compose.yml 文件,使用docker目录中的 Dockerfile,如下图: 五、修改 Dockerfile 文件 Laravel 8 默认用的是./docker/8.0目录下的 Dockerfile,本文将以此来讲解。7.4或其他版本与此类似。 1. 加速 Linu...
myhui0926 未填写
修改文件 C:Users2018977115-pc 你的项目名字 vendorlaravelsailruntimes8.0 下Dockerfile 在RUN apt-get update 前增加 RUNsed-i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g/etc/apt/sources.listRUNsed-i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g/etc/apt/sources.listRUNapt-getclean AI代...
docker OK,既然环境已经没有问题了,我们看下Laravel Sail是如何使用的。 首先安装 Laravel 项目 代码语言:javascript 复制 composer create-project laravel/laravel sail 看文档是直接可以使用命令./vendor/bin/sail up即可 安装完成 进到 sail 项目目录里
目前laravel8.x的官网推荐使用docker和laravel sail包来安装laravel,我的操作系统是windows 10,在安装过程中遇到了很多问题。如果按照步骤的话是这样的安装的。 1.首先安装docker,当然docker对windows的支持是不行的,所以要安装一个辅助的WSL2这个类似于在windows上安装使用linux的软件,还要安装一个linux操作系统,类似ubu...
(2)Ubuntu PPA 加速 在vendor/laravel/sail/runtimes/8.0/Dockerfile 文件中,搜索并将: http://ppa.launchpad.net 替换为: https://launchpad.proxy.ustclug.org (3)下载 Composer 可执行文件 在vendor/laravel/sail/runtimes/8.0/Dockerfile 文件中,搜索并将: ...
上篇教程学院君给大家演示了如何在 Windows 中安装 WSL 版 Ubuntu 虚拟机,并且在虚拟机中安装了 PHP、...
Laravel Sail'sdocker-compose.ymlfile defines a variety of Docker containers that work together to help you build Laravel applications. Each of these containers is an entry within theservicesconfiguration of yourdocker-compose.ymlfile. Thelaravel.testcontainer is the primary application container that ...
At its heart, Sail is thedocker-compose.ymlfile and thesailscript that is stored at the root of your project. Thesailscript provides a CLI with convenient methods for interacting with the Docker containers defined by thedocker-compose.ymlfile. ...