Home > PHP Framework > Laravel > Solve the problem that the ubuntu software source is very slow or the connection fails when Laravel installs Sail

Solve the problem that the ubuntu software source is very slow or the connection fails when Laravel installs Sail

藏色散人
Release: 2021-03-18 08:54:27
forward
2919 people have browsed it

The following tutorial column will introduce to you how to solve the problem that the ubuntu software source is very slow or the connection fails when Laravel installs sail. I hope it will be helpful to friends in need!

Laravel ubuntu software source is very slow or connection failed when installing sail. SolutionSolve the problem that the ubuntu software source is very slow or the connection fails when Laravel installs Sail

Modify Laravel sail ubuntu software source

Modify the file
C:Users2018977115-pc Your project name vendorlaravelsailruntimes8.0

Under Dockerfile

Add

RUN  sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN  sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list

RUN  apt-get clean
Copy after login

before RUN apt-get update and then in Linux After executing the

create project below, you can navigate to the application directory and start Laravel Sail. Laravel Sail provides a simple command line interface for interacting with Laravel's default Docker configuration:
cd 你的项目名字

./vendor/bin/sail up
Copy after login

The first time you run the Sailup command, Sail's application container will be built on your computer. This may take several minutes. Don't worry, subsequent attempts to launch Sail will be faster.

Once the application's Docker container is started, you can access the application in a web browser at: http://localhost/index.php.

The above is the detailed content of Solve the problem that the ubuntu software source is very slow or the connection fails when Laravel installs Sail. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template